Cloudanix VulnDB

CVE-2021-46346

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 mistake in a JavaScript engine can make any program that uses it suddenly stop working when it receives certain date-related instructions.

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

The flaw triggers an assertion failure inside the ECMA date prototype dispatch handler, causing the JavaScript engine to abort and the hosting process to crash.

Why it matters to the business

Services or devices that embed the affected engine can be forced offline by a single malicious script or input, producing availability loss until manual restart.

How an attack unfolds

An attacker supplies a crafted JavaScript payload that exercises the Date prototype setter with values that violate the engine's internal time-zone adjustment invariant, causing the assertion to fire and the process to terminate.

How to fix it

Upgrade JerryScript to a version that removes or guards the assertion; if no fixed release exists, add defensive input validation or sandboxing around date-handling code paths to prevent the crashing input from reaching the engine.

How to confirm the fix worked

Confirm the installed JerryScript version is newer than 3.0.0, then execute a minimal Date-setter test case that previously reproduced the assertion and verify the engine no longer aborts.

Typical attack path

  1. Locate an application or device that embeds the vulnerable JerryScript engine
  2. Craft or obtain JavaScript that manipulates Date objects to trigger the failing assertion
  3. Deliver the payload via any input channel that the engine evaluates (file, network message, or script tag)
  4. Observe immediate process crash and service interruption

How to detect it

Search application and system logs for the exact assertion message or the function name ecma_builtin_date_prototype_dispatch_set; correlate sudden process crashes with JavaScript evaluation events.

  • Assertion 'local_tza == ecma_date_local_time_zone_adjustment (date_value)' failed
  • ecma_builtin_date_prototype_dispatch_set

What your security team should do

  • Inventory all products and firmware that ship JerryScript 3.0.0 or earlier
  • Prioritize patching or replacing the engine in any internet-facing or high-availability component
  • Add runtime monitoring for unexpected process exits that contain the date-prototype assertion string
  • Temporarily disable or restrict JavaScript date APIs if an upgrade path is unavailable

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