High Severity Vulnerability in devalue: Quadratic Expansion in uneval
Summary
GHSA-mcm9-63f2-9j32: devalue: Repeated primitive strings cause quadratic expansion in uneval. Affects devalue versions < 5.9.3. Fixed in 5.9.3. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
devalue is an npm package designed for serializing JavaScript objects into a format that can be evaluated later. It is widely used in applications that require safe serialization of data. However, it has a vulnerability that can lead to significant performance issues under specific conditions, making it crucial for developers to be aware of this risk.
Vulnerability Detail
The vulnerability arises when data that has been parsed is passed to the uneval function. Under certain constrained circumstances, this can cause a small payload to expand into a very large serialized string, leading to potential denial of service (DoS) conditions. This issue is classified under CWE-400 (Uncontrolled Resource Consumption) and CWE-409 (Improper Resource Shutdown or Release), indicating that it can severely impact application performance and resource management.
How To Fix
Latest published version: 6.0.3 as of 23 Oct 2026
npm install devalue@6.0.3
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
5.9.3
This is the first release that contains the fix.
npm install devalue@5.9.3
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If you cannot immediately update the package, consider implementing input validation to ensure that the data being passed to uneval is controlled and does not lead to excessive resource consumption.
Conclusion
The devalue package has a high severity vulnerability that can lead to quadratic expansion in uneval, potentially causing denial of service. It is crucial for developers to update to version 5.9.3 or later to mitigate this risk. Additionally, using Vulert can help monitor and alert for such vulnerabilities in real-time.
See every vulnerability recorded for devalue →
FAQ
The CVSS score of this vulnerability is 8.2, indicating a high severity level.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.
The primary consequence is the risk of denial of service (DoS) due to excessive resource consumption, which can significantly degrade application performance.
Yes, the vulnerability has been patched in version 5.9.3 of the devalue package.
If immediate updates are not possible, implement input validation to control the data passed to uneval and mitigate the risk of resource exhaustion.
References
Related vulnerabilities
Recent vulnerabilities recorded for devalue.