CVE-2021-46351
Medium · 5.5CVSS
5.5
EPSS
0.6%
Published
Jan 20, 2022
CISA due date
—
Cloudanix analysis
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.
- 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
- Identify a target application embedding JerryScript 3.0.0
- Craft or obtain JavaScript input that exercises Date.prototype setters
- Deliver the input via local execution or user-interaction path
- 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
- 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