GIVE YOUR AGENT THE EVIDENCE

Set up in your agent.

One prompt to get started. Paste it into your coding agent to connect cve.new through MCP and bring vulnerability context into your workflow.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

GIVE YOUR AGENT THE EVIDENCE

Investigate in your agent.

Turn this advisory into a focused investigation. Ask your agent to check your project’s versions, explain the evidence, and suggest a compatible fix.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

Check your stack
GHSA-gxr4-xjj5-5px2medium6.9

Potential XSS vulnerability in jQuery

Impact

Passing HTML from untrusted sources - even after sanitizing it - to one of jQuery's DOM manipulation methods (i.e. .html(), .append(), and others) may execute untrusted code.

Source excerpt · OSV

Affected packages

Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.

Affected rangeRecorded fix
From 1.12.0 before 3.5.0Semantic versions3.5.0

Version evidence: OSV · GHSA-gxr4-xjj5-5px2

View original version evidence (0 explicit versions)
jquery NuGet
Affected rangeRecorded fix
From 1.12.0 before 3.5.0Ecosystem versions3.5.0

Version evidence: OSV · GHSA-gxr4-xjj5-5px2

View original version evidence (28 explicit versions)
Affected rangeRecorded fix
Earlier releases before 4.4.0Ecosystem versions4.4.0

Version evidence: OSV · GHSA-gxr4-xjj5-5px2

View original version evidence (74 explicit versions)
Affected rangeRecorded fix
Earlier releases before 1.19.0Ecosystem versions1.19.0

Version evidence: OSV · GHSA-gxr4-xjj5-5px2

View original version evidence (60 explicit versions)
Affected rangeRecorded fix
From 1.12.0 before 3.5.0Ecosystem versions3.5.0

Version evidence: OSV · GHSA-gxr4-xjj5-5px2

View original version evidence (21 explicit versions)

Original source description

Impact

Passing HTML from untrusted sources - even after sanitizing it - to one of jQuery's DOM manipulation methods (i.e. .html(), .append(), and others) may execute untrusted code.

Patches

This problem is patched in jQuery 3.5.0.

Workarounds

To workaround the issue without upgrading, adding the following to your code:

jQuery.htmlPrefilter = function( html ) {
	return html;
};

You need to use at least jQuery 1.12/2.2 or newer to be able to apply this workaround.

References

https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/ https://jquery.com/upgrade-guide/3.5/

For more information

If you have any questions or comments about this advisory, search for a relevant issue in the jQuery repo. If you don't find an answer, open a new issue.

References