Skip to main content

js-beautify EUVDEUVD-2026-98411

| CVE-2026-109149 MEDIUM
Memory Allocation with Excessive Size Value (CWE-789)
2026-10-13 VulDB GHSA-jgqr-xggw-6823
5.5
CVSS 4.0 · Vendor: VulDB
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach endpoint accepting untrusted code input
  2. Delivery
    Submit crafted beautifier payload
  3. Exploit
    Trigger uncontrolled memory allocation
  4. Execution
    Exhaust process memory
  5. Impact
    Denial of service

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory allocation limits
Exploitation Conditions

Exploitation requires that the embedding application pass attacker-controlled input (JavaScript/CSS/HTML source) into js-beautify's beautification routines and expose that path to untrusted/remote callers - js-beautify is a library, so it is only remotely reachable when wrapped in a network-facing service such as a web-based formatter or API. No authentication or user interaction is needed per PR:N/UI:N. Limiting factors: impact is confined to availability (memory exhaustion / DoS) with no confidentiality or integrity effect; applications that only beautify trusted/first-party code, or that impose input-size/memory limits, are not meaningfully exposed. Affected versions are stated as js-beautify up to 1.15.1 (1.x) and 2.0.3 (2.x).

Impact

This is a moderate-severity availability issue, not a high-priority emergency. The input CVSS 4.0 base score is 6.9 with a vector of AV:N/AC:L/PR:N/UI:N and impact limited strictly to availability (VA:L; VC:N/VI:N), consistent with CWE-789 (uncontrolled memory allocation) - i.e. a denial-of-service via memory exhaustion rather than code execution or data theft. The vector's E:P (Proof-of-Concept) exploit maturity signals that exploit/trigger code exists, so publicly available exploit code likely exists, but there is NO CISA KEV listing and NO EPSS score in the provided data, so there is no evidence of active or widespread exploitation. The signals are internally consistent (remote, low-complexity, unauthenticated, but low technical impact) rather than conflicting. The most important caveat: the AV:N / PR:N / 'attack may be launched remotely' framing assumes the host application feeds attacker-controlled input into js-beautify and exposes it over the network - js-beautify is a code-formatting library, not a network service, so real-world reachability is entirely dependent on how the embedding application uses it. The sole source is VulDB and the vendor did not respond, so affected-version and root-cause details are low-confidence. Net: a genuine but low-urgency DoS best handled via routine patching, not out-of-band response.

Exploit ScenarioDerived

An application exposes js-beautify (e.g. an online code formatter or an API that beautifies user-submitted JavaScript/CSS/HTML) to untrusted input. An attacker submits a specially crafted payload that drives uncontrolled memory allocation inside the beautifier, exhausting process memory and causing a denial of service for the hosting service. A proof-of-concept trigger is indicated by the CVSS E:P (Proof-of-Concept) maturity flag.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 13, 2026

Uncontrolled memory allocation in the js-beautify library (versions up to and including 1.15.1 on the 1.x line and 2.0.3 on the 2.x line) lets remote, unauthenticated attackers drive excessive memory consumption by feeding crafted JavaScript, CSS, or HTML source into the beautifier's formatting routines, degrading or crashing the host process. The weakness is a library-level availability flaw: js-beautify is not network-facing on its own, so real exposure only materializes when an embedding application - a web-based formatter, code-review service, IDE backend, or API - passes attacker-supplied input into it. Per the CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N, with VA:L and no confidentiality or integrity impact), the effect is limited to denial of service, and the E:P exploit-maturity metric indicates publicly available proof-of-concept exploit code exists; there is no indication of confirmed active exploitation, and the vendor did not respond to the disclosure, so no vendor patch has been identified.

RemediationAI

No vendor-released patch has been identified at the time of analysis: per the disclosure record the vendor was contacted early but did not respond, so there is no fixed version to upgrade to and the upstream issue at https://github.com/beautifier/js-beautify/issues/2522 should be monitored for a maintainer fix or commit. Until then, treat this strictly as an availability issue and apply compensating controls on the wrapper rather than the library. First, enforce a hard cap on the size and structural complexity of any input accepted from untrusted callers before it reaches js-beautify, rejecting oversized payloads and overly nested documents at the API boundary - the trade-off is that legitimate large files will be refused, so thresholds must be tuned to real workloads. Second, bound the memory available to the formatting process so runaway allocation cannot take down the host: run beautification in an isolated worker or child process with a strict heap limit (for example Node's --max-old-space-size or container memory limits and ulimit), accepting that an over-limit job will be killed with an error rather than completing gracefully. Third, add execution timeouts and per-client rate limiting to any exposed formatting endpoint, which reduces the feasibility of repeated memory-exhaustion attempts at the cost of throughput for heavy users. Fourth, if beautification of untrusted input is not a core requirement, disable or gate that functionality behind authentication or an internal-only network path, since the independent assessment confirms no authentication or user interaction is needed once the path is exposed. As no confirmed active exploitation has been reported, these measures can be prioritized as routine hardening rather than emergency response.

Affected VersionsENISA

js-beautify 2.0.1
js-beautify 2.0.2
js-beautify 1.15.0
js-beautify 1.15.1
js-beautify 2.0.0
js-beautify 2.0.3

Affected Packages

euvd js_beautify no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

js-beautify is a widely used open-source beautifier for JavaScript, CSS, and HTML, distributed as an npm package and also usable as a CLI and embeddable library. The flaw is classified as CWE-789 (Memory Allocation with Excessive Size Value), meaning the code allocates memory based on an attacker-influenced size or structural value without adequately bounding it. In a beautifier this class of bug typically surfaces when the parser/tokenizer walks attacker-controlled input - deeply nested expressions, extremely long token runs, or pathological formatting structures - and the internal token buffers, output builders, or recursive parse state expand disproportionately relative to the input, exhausting heap and triggering an out-of-memory condition or severe slowdown. The CPE cpe:2.3:a:beautifier:js-beautify:*:*:*:*:*:*:*:* covers all versions below the fixed release, matching the reported ranges of up to 1.15.1 and 2.0.3. Because js-beautify is a library rather than a service, remote reachability depends entirely on the host application: it is only exploitable remotely when a network-exposed wrapper (for example a web formatter UI or a formatting API endpoint) forwards untrusted code to the beautifier. The independent assessment confirms the impact is availability-only (VC:N/VI:N/VA:L, S:U) with no confidentiality or integrity effect, and no authentication or user interaction is required when such a wrapper exists.

Know when Js Beautify gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulDB) PRIMARY 5.5 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P
vuln.today AI 5.3 MEDIUM

Remote low-complexity unauthenticated input (AV:N/AC:L/PR:N/UI:N) assuming the library is network-exposed; impact is memory-exhaustion DoS only, so C:N/I:N and A:L.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (VulDB).

CVSS VectorVendor: VulDB

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
CVSS changed
Oct 13, 2026 - 10:22 NVD
6.9 (MEDIUM) 5.5 (MEDIUM)

DescriptionCVE.org

A weakness has been identified in beautifier js-beautify up to 1.15.1/2.0.3. The affected element is an unknown function. Executing a manipulation can lead to uncontrolled memory allocation. The attack may be launched remotely. The vendor was contacted early about this disclosure but did not respond in any way.

Threat Intelligence Overview

EPSS Score
0.5%
Top 57% exploitable
Prevalence
Medium
very popular npm code-formatting library, but largely dev-time/tooling use
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.5%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

29
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +28
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy