CVE-2012-6708
Cross-Site Scripting in jquery
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.
Affected Maven artifacts (3)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.webjars.npm » jquery | < 1.9.0 | 1.9.0 |
| org.mvnpm » jqueryvia npm jquery | < 1.9.0 | 1.9.0 |
| org.webjars » jqueryvia npm jquery | < 1.9.0 | 1.9.0 |
| org.webjars.npm » jqueryvia npm jquery | < 1.9.0 | 1.9.0 |
Blast radius
58% of the dependent artifacts (82) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 208 |
| 2 hops | 244 |
| 3 hops | 127 |
| 4 hops | 109 |
Most used dependents
- org.webjars » bootstrap475 usages
- org.webjars » font-awesome188 usages
- org.webjars » jquery-ui98 usages
- de.agilecoders.wicket » wicket-bootstrap-extensions59 usages
- org.webjars » datatables52 usages
- de.jensd » fontawesomefx41 usages
- org.webjars » select237 usages
- org.webjars » angular-ui-bootstrap28 usages
- org.apache.marmotta » marmotta-core25 usages
- de.tudarmstadt.ukp.inception.app » inception-ui-core24 usages
- de.tudarmstadt.ukp.clarin.webanno » webanno-ui-core22 usages
- de.tudarmstadt.ukp.clarin.webanno » webanno-ui-annotation15 usages
- org.webjars » jstree12 usages
- org.webjars » jquery-ui-themes12 usages
- org.webjars » datatables-tools11 usages
Computed from the dependency graph of build 20261127.1117 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
Other ecosystems
Also affects npm (1 package) NuGet (1 package) RubyGems (1 package) . See all on OSV
