CVE-2022-22890
Medium · 5.5CVSS
5.5
EPSS
0.8%
Published
Jan 20, 2022
CISA due date
—
Cloudanix analysis
A programming mistake in a small JavaScript engine can make any program that uses it suddenly stop working when it receives certain bad input.
- 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
Local assertion failure in the JavaScript scanner during argument type checks causes the Jerryscript engine to terminate.
Why it matters to the business
Applications or devices embedding Jerryscript become unavailable when processing certain untrusted scripts, leading to service disruption and potential loss of functionality in embedded or IoT environments.
How an attack unfolds
An attacker supplies a specially crafted JavaScript file or snippet to a local application using Jerryscript; the parser's scanner encounters an unexpected arguments state, triggering the hard-coded assertion and crashing the process.
How to fix it
Upgrade to a patched Jerryscript release once available; in the interim, avoid processing untrusted JavaScript and implement strict input validation or sandboxing around script loading.
How to confirm the fix worked
Reproduce the crash with the original assertion-triggering input on an unpatched build; confirm absence of the crash and presence of updated parser logic on a patched build.
Typical attack path
- Locate an application or device that embeds the vulnerable Jerryscript engine
- Craft or obtain a JavaScript input that violates the scanner's arguments-type expectations
- Cause the target process to parse the input (for example by opening a file or loading a script)
- Trigger the assertion failure to crash the engine and deny service
How to detect it
Review application and system logs for the exact assertion-failure message from js-scanner-util.c, unexpected process crashes during JavaScript parsing, and any core dumps or stack traces containing scanner argument checks.
- arguments_type != SCANNER_ARGUMENTS_PRESENT && arguments_type != SCANNER_ARGUMENTS_PRESENT_NO_REG
- js-scanner-util.c
- Assertion 'arguments_type
What your security team should do
- Inventory all systems and products that embed Jerryscript and prioritize those reachable by untrusted input
- Apply vendor updates as soon as fixed versions are released
- Add runtime monitoring for unexpected process terminations in Jerryscript-based components
- Restrict execution of externally supplied scripts until patches are deployed
The record
There is an Assertion 'arguments_type != SCANNER_ARGUMENTS_PRESENT && arguments_type != SCANNER_ARGUMENTS_PRESENT_NO_REG' failed at /jerry-core/parser/js/js-scanner-util.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