CVE-2015-8857: Incorrect Handling of Non-Boolean Comparisons During Minification in uglify-js

uglify-js Updated 02 Oct 2025

Summary

24/10/2017
Yes i
Critical
9.8

CVE-2015-8857: Incorrect Handling of Non-Boolean Comparisons During Minification in uglify-js. Affects uglify-js versions < 2.4.24. Fixed in 2.4.24. How to fix ↓

Also tracked for

The same CVE-2015-8857 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The uglify-js package is a JavaScript parser, minifier, and compressor. It is commonly used to reduce the size of JavaScript files for improved performance. However, versions prior to 2.4.24 are vulnerable to a specific issue that can alter the functionality of crafted JavaScript code after minification.

Vulnerability Detail

The vulnerability in uglify-js arises from incorrect handling of non-boolean comparisons during the minification process. This can lead to unexpected behavior in the minified code, potentially introducing security vulnerabilities or causing the code to behave differently than intended. The impact of this vulnerability can vary depending on the specific code being minified and the context in which it is used.

How To Fix

Minimum fixed version

2.4.24

This is the first release that contains the fix.

npm install uglify-js@2.4.24

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround mentioned for this vulnerability.

Conclusion

The vulnerability in uglify-js can lead to altered functionality of minified JavaScript code. To mitigate this issue, it is recommended to upgrade to version 2.4.24 or higher. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for uglify-js →

Share this vulnerability

FAQ

uglify-js is a JavaScript parser, minifier, and compressor used to reduce the size of JavaScript files.

Versions prior to 2.4.24 are affected by this vulnerability.

The vulnerability can result in altered functionality of minified JavaScript code, potentially introducing security vulnerabilities or causing unintended behavior.

To fix this vulnerability, upgrade uglify-js to version 2.4.24 or higher.

No specific workaround has been mentioned for this vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for uglify-js.

How To Fix

Minimum fixed version

2.4.24

This is the first release that contains the fix.

npm install uglify-js@2.4.24

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback

Follow Vulert in Google

Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.