GHSA-2pqj-h3vj-pqgw

Cross-Site Scripting in jquery

En bref

Publiée
Mise à jour
CVE
CVE-2012-6708
CVSS_V3
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Description

Affected versions of `jquery` are vulnerable to cross-site scripting. This occurs because the main `jquery` function uses a regular expression to differentiate between HTML and selectors, but does not properly anchor the regular expression. The result is that `jquery` may interpret HTML as selectors when given certain inputs, allowing for client side code execution. ## Proof of Concept ``` $("#log").html( $("element[attribute='<img src=\"x\" onerror=\"alert(1)\" />']").html() ); ``` ## Recommendation Update to version 1.9.0 or later.

Paquets affectés

PaquetVersions
npm · jqueryintroduced 0, fixed 1.9.0
Maven · org.webjars.npm:jqueryintroduced 0, fixed 1.9.0
NuGet · jQueryintroduced 0, fixed 1.9.0
RubyGems · jquery-railsintroduced 0, fixed 2.2.0

Références

Sources

SourceLicence
OSV.devCC-BY 4.0 — GitHub Advisory Database