Skip to content

Conversation

@wyhaines
Copy link

@wyhaines wyhaines commented Nov 5, 2025

At Bright Security, we've encountered a situation where retirejs incorrectly identifies a version of jquery as vulnerable when it is not.

The standard jquery version 1.12.4 is vulnerable to several CVEs. However, Adobe maintains a patched version (1.12.4-aem) that is not vulnerable.

This change adds the ability to exclude certain results from positive matches, so that patched versions of vulnerable libraries don't cause false positives. This capability is used to exclude jquery 1.12.4-aem, which is a version patched by Adobe to fix the vulnerabilities that exist in 1.12.4.

I have also added some tests for the functionality.

I didn't see any contributing guidelines, so please let me know if you have any questions, or if there is anything that you would like to see changed.

…s, so that patched versions of vulnerable libraries don't cause false positives. This capability is used to exclude jquery 1.12.4-aem, which is a version patched by Adobe to fix the vulnerabilities that exist in 1.12.4.
@eoftedal
Copy link
Contributor

eoftedal commented Nov 6, 2025

Hi @wyhaines. This is an excellent addition!
One minor change request: The purpose of the versioned repository JSONs is to not affect the format of the older ones as retire.js and some other software depends on them and are rigid on format validation. So we would have to introduce a v5 and avoid this new field in jsrepository.json + v2-v4, and change cli.ts to load the v5 version.

@wyhaines
Copy link
Author

wyhaines commented Nov 6, 2025

That makes sense. Thanks for the context. I will take a look at making that change.

@eoftedal
Copy link
Contributor

eoftedal commented Nov 6, 2025

Thank you! We should also consider dropping some of the .strict() calls in the zod repo parser. Let me know if you have any views on which ones to drop.

@eoftedal
Copy link
Contributor

Btw, @wyhaines, I can fix the versioning if you dont have time.

Do you by any chance have a copy of the aem version so I can test with it?

@wyhaines
Copy link
Author

wyhaines commented Nov 11, 2025 via email

@eoftedal
Copy link
Contributor

eoftedal commented Nov 14, 2025

I found different versions on github:

@wyhaines
Copy link
Author

Oh, that's fun. I am waiting for a response back from the affected client on this. However, you tracked down 4 versions, all with the same version string, with three different patch sets?

(sigh)

@eoftedal
Copy link
Contributor

eoftedal commented Nov 15, 2025

Yes, and they all have the same header including the same timestamp:

/*!
 * jQuery JavaScript Library v1.12.4-aem
 * http://jquery.com/
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2016-05-20T17:17Z
 */

Edit: The timestamp (2016-05-20T17:17Z) is the original jQuery 1.12.4 timestamp

@eoftedal
Copy link
Contributor

eoftedal commented Nov 16, 2025

From what I understand Adobe is supposed to have patched this file, but it makes me wonder if they released several version of this patched file.
In the list of minified versions above, the difference between the first two, is the Prototype pollution patch (CVE-2019-11358):
image

Here is the comparison. They all patch CVE-2015-9251 (so my initial analysis was wrong on this CVE)

image

Given this analysis it would be hard to say anything about a detected 1.12.4-aem version except for CVE-2015-9251.

@wyhaines
Copy link
Author

Yeah. This is not what I was expecting, given the problem description I initially had to work with. I am still awaiting a copy of 1.12.4-aem from our side, but I am wondering what you would like me to do here? Revert all of the repository changes completely while leaving the capability to add an exclusion in the future?

@eoftedal
Copy link
Contributor

I would like to keep the exclusion. It is still valid for CVE-2015-9251 for all -aem versions.
So I guess the required changes are:

  1. Add a v5 repo and set retire.js to load that as the default repository in cli.ts (I'll deal with the chrome extension)
  2. Modify convertToVersioned / convertFormat.js to only copy exclusions over to v5
  3. Modify the master repo to only have the exclusion for CVE-2015-9251

BTW: I have added the ability to test a custom jQuery version on the jQuery test website: https://research.insecurelabs.org/jquery/test/
Just plug in the URL and click "Run custom".

@eoftedal
Copy link
Contributor

I was able to find more examples through websites listed on https://trends.builtwith.com/websitelist/Adobe-Experience-Manager

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants