oss-sec mailing list archives

Re: CVE request: uglify-js node.js module <2.4.24 incorrectly handles non-boolean comparisons during minification


From: Reed Loden <reed () reedloden com>
Date: Mon, 24 Aug 2015 12:59:14 -0700

On Mon, Aug 24, 2015 at 12:50 PM, Florian Weimer <fweimer () redhat com> wrote:

On 08/24/2015 08:26 PM, Reed Loden wrote:
As seen on Hacker News --
https://zyan.scripts.mit.edu/blog/backdooring-js/

Blog post has all the details, but basically the UglifyJS node module
has a
problem where the combination of De Morgan’s Law and non-boolean values
can
lead to a case where code is incorrectly minified, which can lead to
possibly malicious minified JS code.

UglifyJS is a "JavaScript parser / mangler / compressor / beautifier
toolkit" for Node.js.

How is this different from a any other compiler bug?  They can be abused
in similar ways by crafted code, and we don't treat them as
vulnerabilities (unless there is actual application impact beyond
synthetic test cases).

Note that I'm not saying this isn't a nice find, I'm just not sure if it
should be considered as a security by itself.


I fully agree not every compiler bug is a security issue, but when one is
used for (theoretically) malicious purposes (including a full write-up and
example PoC), seems like there should be some middle ground here. If we're
always being reactive and waiting for an issue to actually be exploited,
we'll never win. Sadly, sometimes it takes an issue being classified as
'security' for folks (including distros) to update their
applications/software to pull in updated dependencies.

~reed

Current thread: