CVE-2021-46347
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 receives certain unexpected data.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Malformed input triggers an assertion failure in ecma_object_check_class_name_is_object during object class validation, causing an immediate process abort.
Why it matters to the business
Applications or services embedding the engine experience sudden crashes and loss of availability when processing attacker-controlled or untrusted scripts.
How an attack unfolds
An attacker supplies a specially crafted script or data object that reaches the failing assertion path; because an exploit is publicly available, the input can be delivered via local file, command-line argument, or embedded script execution to force a denial-of-service condition.
How to fix it
Upgrade to a maintained version of JerryScript that removes the assertion or adds proper error handling for invalid objects; where an upgrade is unavailable, isolate or sandbox any JerryScript execution and reject untrusted input before it reaches the engine.
How to confirm the fix worked
Replay the crashing input in a controlled environment and confirm the process no longer aborts with the original assertion message; monitor for graceful error returns instead of crashes.
Typical attack path
- Identify a target process or application that embeds JerryScript 3.0.0
- Prepare or obtain a minimal JavaScript snippet that violates the expected object class invariant
- Cause the target to evaluate or parse the malicious input (local execution, file open, or API call)
- Trigger the assertion failure resulting in immediate process termination
How to detect it
Search application and system logs for the exact assertion failure string, unexpected process exits, or core dumps originating from jerry-core/ecma/operations/ecma-objects.c around the time of suspected attacks.
- ecma_object_check_class_name_is_object (obj_p)
- /jerry-core/ecma/operations/ecma-objects.c
- Assertion.*failed.*jerry
What your security team should do
- Treat the issue as a high-priority availability risk given the public exploit
- Inventory all products and services that embed JerryScript and schedule upgrades or replacements
- Implement input sanitization or sandboxing around any remaining instances until fixed
- Add crash-monitoring alerts for the assertion string in application logs
The record
There is an Assertion 'ecma_object_check_class_name_is_object (obj_p)' failed at /jerry-core/ecma/operations/ecma-objects.c 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