CVE-2023-36109

9.8 CRITICAL

📋 TL;DR

A buffer overflow vulnerability in JerryScript 3.0's ecma_stringbuilder_append_raw component allows remote attackers to execute arbitrary code. This affects systems running vulnerable versions of JerryScript, a lightweight JavaScript engine commonly embedded in IoT devices and resource-constrained environments. Attackers can exploit this to gain full control of affected systems.

💻 Affected Systems

Products:
  • JerryScript
Versions: Version 3.0 (specifically affected)
Operating Systems: All operating systems running JerryScript
Default Config Vulnerable: ⚠️ Yes
Notes: Any device or application using JerryScript 3.0 is vulnerable regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, data theft, and persistent backdoor installation.

🟠

Likely Case

Remote code execution allowing attackers to run arbitrary commands, potentially leading to device takeover in IoT deployments.

🟢

If Mitigated

Denial of service or application crash if exploit attempts are blocked by security controls.

🌐 Internet-Facing: HIGH - Remote exploitation without authentication makes internet-facing systems particularly vulnerable.
🏢 Internal Only: MEDIUM - Internal systems are still vulnerable but require network access; lateral movement possible if exploited.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Public proof-of-concept code exists in GitHub repositories, making exploitation straightforward for attackers.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Version 3.0.1 or later

Vendor Advisory: https://github.com/jerryscript-project/jerryscript/issues/5080

Restart Required: Yes

Instructions:

1. Update JerryScript to version 3.0.1 or later. 2. Recompile any applications using JerryScript. 3. Restart affected services or devices.

🔧 Temporary Workarounds

Disable vulnerable component

all

If possible, disable or restrict access to the ecma_stringbuilder_append_raw functionality in JerryScript.

# Requires code modification - no direct command

Network segmentation

all

Isolate devices running JerryScript from untrusted networks.

# Configure firewall rules to restrict access to JerryScript services

🧯 If You Can't Patch

  • Implement strict network access controls to limit exposure
  • Deploy runtime application self-protection (RASP) or web application firewall (WAF) with buffer overflow protection

🔍 How to Verify

Check if Vulnerable:

Check JerryScript version: if version is exactly 3.0, system is vulnerable.

Check Version:

jerry --version or check build configuration files

Verify Fix Applied:

Verify JerryScript version is 3.0.1 or later after update.

📡 Detection & Monitoring

Log Indicators:

  • Unusual process creation from JerryScript
  • Memory access violations in system logs
  • Application crashes with segmentation faults

Network Indicators:

  • Unexpected network connections from JerryScript processes
  • Suspicious payloads targeting JerryScript ports

SIEM Query:

source="*jerry*" AND (event_type="crash" OR event_type="segfault")

🔗 References

📤 Share & Export