CVE-2023-38961
Critical · 9.8CVSS
9.8
EPSS
1.5%
Published
Aug 21, 2023
CISA due date
—
Cloudanix analysis
A flaw in an older version of a JavaScript engine used in many small devices lets attackers take full control of the device over the network without any user action.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Medium
What it actually does
Buffer overflow in scanner_is_context_needed within js-scanner-until.c allows out-of-bounds writes that corrupt memory and enable arbitrary code execution when processing crafted JavaScript input.
Why it matters to the business
Compromised embedded or IoT devices running affected JerryScript versions can be fully taken over remotely, leading to data theft, device hijacking, or use as attack infrastructure with no user interaction required.
How an attack unfolds
An attacker sends specially crafted JavaScript to a JerryScript-based application or device; the malformed input reaches scanner_is_context_needed, overflows a buffer, overwrites control structures, and redirects execution to attacker-supplied shellcode.
How to fix it
Upgrade to a patched JerryScript release once available; until then, isolate affected instances, apply input sanitization or sandboxing around the scanner, and monitor for anomalous memory behavior.
How to confirm the fix worked
Confirm JerryScript version is no longer 3.0.0; recompile from verified source and run regression tests on js-scanner-until.c; use memory-safety tools such as ASAN during validation.
Typical attack path
- Identify network-exposed or locally reachable JerryScript interpreter or application
- Craft and transmit malicious JavaScript payload targeting scanner_is_context_needed
- Trigger buffer overflow to achieve memory corruption and control-flow hijack
- Execute arbitrary code for persistence, data exfiltration, or lateral movement
How to detect it
Search application and system logs for repeated or malformed JavaScript parsing events immediately preceding crashes; inspect core dumps or memory dumps for anomalies near scanner functions; correlate with network traffic containing unusual script payloads.
What your security team should do
- Inventory all deployments of JerryScript 3.0.0 immediately due to public exploit availability
- Prioritize network segmentation and removal of direct internet exposure for affected devices
- Establish monitoring for memory-corruption indicators in logs and process behavior
- Track upstream JerryScript repository for patch release and test upgrades promptly
The record
Buffer Overflwo vulnerability in JerryScript Project jerryscript v.3.0.0 allows a remote attacker to execute arbitrary code via the scanner_is_context_needed component in js-scanner-until.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-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
- CVE-2023-34868 Jerryscript 3.0 (commit 05dbbd1) was discovered to contain an Assertion Failure via the… Also affects iotjs