CVE-2020-23323

9.8 CRITICAL

📋 TL;DR

CVE-2020-23323 is a critical heap buffer overflow vulnerability in JerryScript's regular expression parser that allows remote code execution. Attackers can exploit this by providing specially crafted JavaScript input containing escape sequences in regular expressions. This affects any application or device using vulnerable versions of the JerryScript JavaScript engine.

💻 Affected Systems

Products:
  • JerryScript JavaScript engine
Versions: JerryScript 2.2.0 and possibly earlier versions
Operating Systems: All operating systems running JerryScript
Default Config Vulnerable: ⚠️ Yes
Notes: Any application or device using JerryScript for JavaScript execution is vulnerable when processing untrusted regular expressions with escape sequences.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution with full system compromise, allowing attackers to execute arbitrary code with the privileges of the JerryScript process.

🟠

Likely Case

Remote code execution leading to application compromise, data theft, or system takeover in affected environments.

🟢

If Mitigated

Denial of service or application crash if exploit attempts are blocked or fail, but system remains intact.

🌐 Internet-Facing: HIGH - JerryScript is often used in IoT devices and embedded systems that may be internet-accessible, making remote exploitation possible.
🏢 Internal Only: MEDIUM - Internal applications using JerryScript could be exploited through malicious input, but requires attacker access to internal systems.

🎯 Exploit Status

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

The vulnerability is in the core parser and requires minimal exploitation complexity. Public GitHub issues demonstrate the crash condition.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: JerryScript 2.3.0 and later

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

Restart Required: Yes

Instructions:

1. Update JerryScript to version 2.3.0 or later. 2. Recompile any applications using JerryScript. 3. Restart services using the updated library.

🔧 Temporary Workarounds

Input validation for regular expressions

all

Validate and sanitize all regular expression inputs before passing to JerryScript parser

Disable regular expression parsing if not needed

all

Configure applications to disable or limit regular expression functionality

🧯 If You Can't Patch

  • Network segmentation to isolate systems using JerryScript
  • Implement strict input validation and sanitization for all JavaScript inputs

🔍 How to Verify

Check if Vulnerable:

Check if application uses JerryScript version 2.2.0 or earlier by examining dependencies or running 'strings' on binaries for JerryScript references

Check Version:

For Linux systems: 'ldconfig -p | grep jerry' or check package manager: 'dpkg -l | grep jerry' or 'rpm -qa | grep jerry'

Verify Fix Applied:

Verify JerryScript version is 2.3.0 or later by checking library version or using package manager queries

📡 Detection & Monitoring

Log Indicators:

  • Segmentation faults or abnormal termination of JerryScript processes
  • Memory corruption errors in application logs
  • Unusual regular expression patterns in input logs

Network Indicators:

  • Unusual network connections from JerryScript processes
  • Exploit attempts containing crafted regular expressions

SIEM Query:

process_name:"jerry" AND (event_type:"crash" OR memory:"corruption" OR error:"segmentation fault")

🔗 References

📤 Share & Export