CVE-2022-22891
Medium · 5.5CVSS
5.5
EPSS
0.6%
Published
Jan 21, 2022
CISA due date
—
Cloudanix analysis
A flaw in a JavaScript engine can make programs that run scripts crash when they receive certain inputs.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Triggers a segmentation fault (SEGV) during garbage collection by dereferencing an invalid object in ecma_ref_object_inline, resulting in process crash.
Why it matters to the business
Causes denial of service for any applications or services relying on the vulnerable JavaScript engine when processing untrusted scripts.
How an attack unfolds
An attacker supplies specially crafted JavaScript that forces the engine into a state where the garbage collector encounters an invalid object reference, leading to immediate crash; public exploits exist and can be adapted for local or embedded use cases.
How to fix it
Upgrade JerryScript to a version that resolves the ecma_ref_object_inline handling flaw; if no upstream fix is available, apply custom patches to the garbage collector or restrict untrusted script execution.
How to confirm the fix worked
Reproduce the crash with known triggering inputs on the vulnerable build, then confirm absence of SEGV after applying updates or mitigations.
Typical attack path
- Deliver malicious JavaScript to the JerryScript interpreter
- Force execution paths that invoke garbage collection
- Trigger invalid object reference in ecma-gc.c
- Cause SEGV and application termination
How to detect it
Inspect process logs and core dumps for segmentation faults originating from ecma-gc.c or the JerryScript binary during script execution.
What your security team should do
- Replace or upgrade all instances of JerryScript 3.0.0 and earlier
- Sandbox or isolate script execution environments
- Add crash monitoring and alerting for JavaScript engine processes
- Review downstream dependents for exposure
The record
Jerryscript 3.0.0 was discovered to contain a SEGV vulnerability via ecma_ref_object_inline in /jerry-core/ecma/base/ecma-gc.c.
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