CVE-2021-46346
Medium · 5.5CVSS
5.5
EPSS
0.6%
Published
Jan 20, 2022
CISA due date
—
Cloudanix analysis
A programming mistake in a JavaScript engine can make any program that uses it suddenly stop working when it receives certain date-related instructions.
- 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
- Locate an application or device that embeds the vulnerable JerryScript engine
- Craft or obtain JavaScript that manipulates Date objects to trigger the failing assertion
- Deliver the payload via any input channel that the engine evaluates (file, network message, or script tag)
- 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
- CVE-2024-33255 Jerryscript commit cefd391 was discovered to contain an Assertion Failure via… Also affects iotjs
- CVE-2024-33260 Jerryscript commit cefd391 was discovered to contain a segmentation violation via the… Also affects iotjs
- CVE-2024-33258 Jerryscript commit ff9ff8f was discovered to contain a segmentation violation via the… Also affects iotjs
- CVE-2024-33259 Jerryscript commit cefd391 was discovered to contain a segmentation violation via the… Also affects iotjs
- CVE-2023-36109 Buffer Overflow vulnerability in JerryScript version 3.0, allows remote attackers to… Also affects iotjs
- CVE-2023-38961 Buffer Overflwo vulnerability in JerryScript Project jerryscript v.3.0.0 allows a remote… Also affects iotjs
- CVE-2023-36201 An issue in JerryscriptProject jerryscript v.3.0.0 allows an attacker to obtain sensitive… Also affects iotjs
- CVE-2023-34867 Jerryscript 3.0 (commit 05dbbd1) was discovered to contain an Assertion Failure via the… Also affects iotjs