CVE-2023-36109
Critical · 9.8CVSS
9.8
EPSS
2.4%
Published
Sep 20, 2023
CISA due date
—
Cloudanix analysis
A flaw in a small JavaScript engine used in many devices lets attackers take full control of the device just by sending bad data over the network.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Buffer overflow in ecma_stringbuilder_append_raw allows remote attackers to overwrite memory and execute arbitrary code.
Why it matters to the business
Compromise of systems using the affected JavaScript engine can lead to full remote takeover, data theft, or use as an entry point for further attacks; the vulnerability remains exploitable years after disclosure with a publicly available exploit.
How an attack unfolds
An attacker sends a specially crafted input that reaches the ecma_stringbuilder_append_raw function, triggering an out-of-bounds write that corrupts memory and redirects execution to attacker-controlled code; the flaw is reachable over the network without authentication.
How to fix it
Upgrade JerryScript to the latest available version that contains a fix for the buffer overflow; if no upstream release exists, apply a backported patch that bounds the copy operation in ecma-helpers-string.c or replace the engine with a maintained alternative.
How to confirm the fix worked
Confirm the ecma_stringbuilder_append_raw function contains length checks before the memcpy operation; recompile and test with the original proof-of-concept input to verify the crash or code execution no longer occurs.
Typical attack path
- Locate a network-exposed or locally reachable application embedding the vulnerable JerryScript engine
- Craft input that passes through string-building operations to reach ecma_stringbuilder_append_raw
- Trigger the buffer overflow to corrupt control structures in memory
- Redirect execution to injected or ROP-based payload for code execution
How to detect it
Review application or system logs for unexpected crashes or memory corruption signals near string handling routines; inspect inbound network traffic or API calls that feed raw strings into the engine for unusually large or malformed payloads.
What your security team should do
- Prioritize inventory of all embedded JerryScript deployments and schedule upgrades
- Apply network segmentation and input sanitization around any unpatched instances
- Monitor EPSS trend and exploit availability for increased urgency if scores rise
The record
Buffer Overflow vulnerability in JerryScript version 3.0, allows remote attackers to execute arbitrary code via ecma_stringbuilder_append_raw component at /jerry-core/ecma/base/ecma-helpers-string.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 | 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-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
- CVE-2023-34868 Jerryscript 3.0 (commit 05dbbd1) was discovered to contain an Assertion Failure via the… Also affects iotjs