CVE-2021-46336
Medium · 5.5CVSS
5.5
EPSS
0.6%
Published
Jan 20, 2022
CISA due date
—
Cloudanix analysis
A flaw in a JavaScript processing tool can make any program that uses it suddenly stop working when it receives certain types of code.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Moderate
- Impact
- Denial Of Service
- Component
- Library
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Triggers an assertion failure in the JavaScript class body parser, resulting in an application crash when processing certain class literal constructs.
Why it matters to the business
Applications relying on the affected JavaScript engine can be forced offline by untrusted input, causing service disruption without data loss or code execution.
How an attack unfolds
An attacker supplies JavaScript containing a class literal that violates internal parser state checks, causing the assertion to fail and the process to terminate.
How to fix it
Upgrade to a newer release of JerryScript that resolves the parser assertion; if no update is available, isolate or sandbox the engine and reject untrusted class-containing scripts.
How to confirm the fix worked
Test the parser with the original triggering class literal after any update and confirm the process no longer terminates with the assertion message.
Typical attack path
- Identify an application embedding the vulnerable JavaScript engine
- Prepare a minimal JavaScript snippet with a class literal that triggers the parser assertion
- Deliver the snippet via file, network, or API input accepted by the application
- Observe immediate crash and denial of service
How to detect it
Search application and system logs for the exact assertion failure string from the parser module and for abrupt process terminations when handling JavaScript input.
What your security team should do
- Inventory all products and services that embed JerryScript
- Apply available updates or implement strict input filtering for JavaScript class syntax
- Monitor crash logs for the parser assertion string
- Consider replacing the engine with a maintained alternative if updates remain unavailable
The record
There is an Assertion 'opts & PARSER_CLASS_LITERAL_CTOR_PRESENT' failed at /parser/js/js-parser-expr.c(parser_parse_class_body) 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