Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-109149 Overview
CVE-2026-109149 is an uncontrolled resource consumption weakness [CWE-400] in the js-beautify library, affecting versions up to 1.15.1 and 2.0.3. An unknown function within the beautifier triggers uncontrolled memory allocation when processing manipulated input. Attackers can exploit the flaw remotely without authentication or user interaction, leading to resource exhaustion in applications that embed the library. According to VulDB, the maintainers were contacted about this disclosure but did not respond.
Critical Impact
Remote attackers can trigger uncontrolled memory allocation in js-beautify, degrading availability for services that process untrusted JavaScript, CSS, or HTML input.
Affected Products
- js-beautify versions up to and including 1.15.1
- js-beautify versions up to and including 2.0.3
- Downstream applications and build tools that bundle the vulnerable library
Discovery Timeline
- 2026-10-13 - CVE-2026-109149 published to the National Vulnerability Database (NVD)
- 2026-10-13 - Last updated in NVD database
Technical Details for CVE-2026-109149
Vulnerability Analysis
The weakness resides inside js-beautify, a widely used JavaScript, HTML, and CSS formatting library distributed through npm and bundled into many editors and build pipelines. Processing crafted input causes the beautifier to allocate memory in an uncontrolled manner. Because the library commonly runs server-side in formatting APIs, CI jobs, and documentation pipelines, the condition can be reached across a network boundary.
The NVD entry classifies the flaw under [CWE-400] (Uncontrolled Resource Consumption). Impact is limited to availability; confidentiality and integrity are not affected. The EPSS probability is 0.522% as of 2026-10-16, placing it in the 43rd percentile for likelihood of exploitation.
Root Cause
The root cause is an unidentified function in js-beautify that fails to bound memory allocation while parsing or formatting input. When supplied with malformed or pathological content, the function expands internal buffers without applying size or complexity limits. The upstream maintainers have not published an analysis, and the referenced GitHub Issue #2522 tracks the behavior.
Attack Vector
The attack vector is network-based with no privileges or user interaction required. An attacker submits crafted source code to any endpoint, worker, or build process that invokes js-beautify on untrusted input. The vulnerable call path then allocates memory until the host process exhausts available resources or crashes.
No verified proof-of-concept code is published. Refer to the VulDB entry for CVE-2026-109149 and the js-beautify repository for ongoing technical discussion.
Detection Methods for CVE-2026-109149
Indicators of Compromise
- Sudden spikes in resident memory for Node.js, Python, or browser worker processes that invoke js-beautify
- Repeated out-of-memory (OOM) terminations of services exposing code formatting or linting endpoints
- Inbound requests containing unusually large or deeply nested JavaScript, HTML, or CSS payloads targeting beautifier routes
Detection Strategies
- Inventory applications and container images that bundle js-beautify at or below versions 1.15.1 and 2.0.3 using software composition analysis
- Correlate web server access logs with process memory metrics to identify requests immediately preceding allocation surges
- Alert on child-process crashes in Node.js runtimes where the stack trace includes js-beautify modules such as beautify.js or beautify-css.js
Monitoring Recommendations
- Enable per-process memory and CPU quotas with alerting when thresholds are breached by formatter workloads
- Track npm and package registry telemetry for installations of vulnerable js-beautify versions across development and production environments
- Monitor API gateways for abnormal payload sizes submitted to formatting, linting, or code review endpoints
How to Mitigate CVE-2026-109149
Immediate Actions Required
- Identify every application dependency chain that resolves to js-beautify at or below the affected versions
- Restrict the maximum size and parsing depth of input accepted by any service that invokes the library
- Isolate formatter workloads in sandboxed processes or containers with strict memory limits to contain exhaustion events
Patch Information
No fixed version is listed in the NVD entry at the time of publication, and the vendor did not respond to the disclosure according to VulDB. Monitor the js-beautify GitHub repository and GitHub Issue #2522 for an upstream fix, then upgrade through npm once a patched release is published.
Workarounds
- Reject input larger than a defined byte threshold before passing it to js-beautify
- Run beautifier operations in worker processes with hard memory caps and automatic restart on OOM
- Disable beautifier endpoints that accept unauthenticated input until a patched release is available
# Example: enforce memory and timeout limits on a Node.js formatter worker
node --max-old-space-size=256 formatter-worker.js &
ulimit -v 524288 # cap virtual memory at 512 MB
timeout 5s node -e "require('js-beautify').js(process.argv[1])" "$INPUT"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

