Cloudanix VulnDB

CVE-2021-46351

Medium · 5.5

CVSS

5.5

EPSS

0.6%

Published

Jan 20, 2022

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A programming error in a JavaScript engine can make any software that uses it suddenly stop working when it tries to handle certain date values.

Exploit Available
Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Denial Of Service
Component
Library
Class
Denial of service
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Assertion failure in ecma_builtin_date_prototype_dispatch_set triggers a crash when processing certain date operations in JerryScript 3.0.0.

Why it matters to the business

Applications or services using the affected JavaScript engine can be forced offline, interrupting normal operations until restart.

How an attack unfolds

An attacker supplies crafted JavaScript that invokes the date prototype setter, hitting the failing assertion and terminating the process. Public exploit code exists, though the vulnerability has not appeared in known campaigns.

How to fix it

Upgrade JerryScript to a version containing the corrected date prototype handling; if no patched release is available, apply vendor patches or isolate the engine from untrusted inputs.

How to confirm the fix worked

Confirm the JerryScript version is newer than 3.0.0 and that the assertion at ecma-builtin-date-prototype.c:421 no longer fires under the same test cases.

Typical attack path

  1. Identify a target application embedding JerryScript 3.0.0
  2. Craft or obtain JavaScript input that exercises Date.prototype setters
  3. Deliver the input via local execution or user-interaction path
  4. Trigger the assertion failure to crash the engine

How to detect it

Search application and system logs for the exact assertion failure string referencing ecma_builtin_date_prototype_dispatch_set and ecma-builtin-date-prototype.c:421; correlate with process crashes around date-handling code.

  • Assertion 'local_tza == ecma_date_local_time_zone_adjustment (date_value)' failed at /jerry-core/ecma/builtin-objects/ecma-builtin-date-prototype.c(ecma_builtin_date_prototype_dispatch_set):421

What your security team should do

  • Inventory all deployments using JerryScript and flag any still on 3.0.0
  • Prioritize upgrade or input sanitization for internet-facing or multi-tenant workloads
  • Monitor public exploit repositories for new samples targeting this assertion

The record

There is an Assertion 'local_tza == ecma_date_local_time_zone_adjustment (date_value)' failed at /jerry-core/ecma/builtin-objects/ecma-builtin-date-prototype.c(ecma_builtin_date_prototype_dispatch_set):421 in JerryScript 3.0.0.

Affected packages

Ecosystem Package Introduced Fixed
Ubuntu:18.04:LTS iotjs 0 No fix
Ubuntu:22.04:LTS iotjs 0 No fix
Ubuntu:Pro:18.04:LTS iotjs 0 No fix
conan jerryscript 3.0.0 No fix

Related vulnerabilities