3.19.3
13 years ago
3 months ago
Known vulnerabilities in the uglify-js package. This does not include vulnerabilities belonging to this package’s dependencies.
Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for freeVulnerability | Vulnerable Version |
---|---|
uglify-js is a JavaScript parser, minifier, compressor and beautifier toolkit. Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via the How to fix Regular Expression Denial of Service (ReDoS)? Upgrade | <3.14.3 |
The How to fix Regular Expression Denial of Service (ReDoS)? Upgrade to version | <2.6.0 |
Tom MacWright discovered that UglifyJS versions 2.4.23 and earlier are affected by a vulnerability which allows a specially crafted Javascript file to have altered functionality after minification. This bug was demonstrated by Yan to allow potentially malicious code to be hidden within secure code, activated by minification. DetailsIn Boolean algebra, DeMorgan's laws describe the relationships between conjunctions (
The law does not hold true when one of the values is not a boolean however. Vulnerable versions of UglifyJS do not account for this restriction, and erroneously apply the laws to a statement if it can be reduced in length by it. Consider this authentication function:
When minified with a vulnerable version of UglifyJS, it will produce the following insecure output, where a token will never expire: ( Formatted for readability )
How to fix Improper minification of non-boolean comparisons? Upgrade UglifyJS to version | >=2.2.0 <2.4.24 |