CVE-2012-6708
Cross-Site Scripting in jquery
CVE-2012-6708 is a medium vulnerability (CVSS 6.1) in Jquery, published January 18, 2018. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 8.63%, the 95th percentile. Fixed in jquery 1.9.0.
jQuery before 1.9.0 is vulnerable to Cross-site Scripting (XSS) attacks. The jQuery(strInput) function does not differentiate selectors from HTML in a reliable fashion. In vulnerable versions, jQuery determined whether the input was HTML by looking for the '<' character anywhere in the string, giving attackers more flexibility when attempting to construct a malicious payload. In fixed versions, jQuery only deems the input to be HTML if it explicitly starts with the '<' character, limiting exploitability only to attackers who can control the beginning of a string, which is far less common.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
NVD Score used
6.1
jQuery before 1.9.0 is vulnerable to Cross-site Scripting (XSS) attacks. The jQuery(strInput) function does not differentiate selectors from HTML in a reliable fashion. In vulnerable versions, jQuery determined whether the input was HTML by looking for the '<' character anywhere in the string, giving attackers more flexibility when attempting to construct a malicious payload. In fixed versions, jQuery only deems the input to be HTML if it explicitly starts with the '<' character, limiting exploitability only to attackers who can control the beginning of a string, which is far less common.
- Record
CVE-2012-6708- CVSS 3.0
- 6.1 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - CVSS 2.0
- 4.3 Medium
AV:N/AC:M/Au:N/C:N/I:P/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
CVE List No score
jQuery before 1.9.0 is vulnerable to Cross-site Scripting (XSS) attacks. The jQuery(strInput) function does not differentiate selectors from HTML in a reliable fashion. In vulnerable versions, jQuery determined whether the input was HTML by looking for the '<' character anywhere in the string, giving attackers more flexibility when attempting to construct a malicious payload. In fixed versions, jQuery only deems the input to be HTML if it explicitly starts with the '<' character, limiting exploitability only to attackers who can control the beginning of a string, which is far less common.
- Record
CVE-2012-6708- Updated
- 2026-11-02
EUVDEUVD-2020-0684 No score
jQuery before 1.9.0 is vulnerable to Cross-site Scripting (XSS) attacks. The jQuery(strInput) function does not differentiate selectors from HTML in a reliable fashion. In vulnerable versions, jQuery determined whether the input was HTML by looking for the '<' character anywhere in the string, giving attackers more flexibility when attempting to construct a malicious payload. In fixed versions, jQuery only deems the input to be HTML if it explicitly starts with the '<' character, limiting exploitability only to attackers who can control the beginning of a string, which is far less common.
- Record
EUVD-2020-0684- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-2pqj-h3vj-pqgw
6.1
Cross-Site Scripting in jquery
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.
- Record
GHSA-2pqj-h3vj-pqgw- CVSS 3.0
- 6.1 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-64, CWE-79
- Updated
- 2026-11-02
OSVALPINE-CVE-2012-6708
6.1
jQuery before 1.9.0 is vulnerable to Cross-site Scripting (XSS) attacks. The jQuery(strInput) function does not differentiate selectors from HTML in a reliable fashion. In vulnerable versions, jQuery determined whether the input was HTML by looking for the '<' character anywhere in the string, giving attackers more flexibility when attempting to construct a malicious payload. In fixed versions, jQuery only deems the input to be HTML if it explicitly starts with the '<' character, limiting exploitability only to attackers who can control the beginning of a string, which is far less common.
- Record
ALPINE-CVE-2012-6708- CVSS 3.0
- 6.1 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
OSVAZL-40951
6.1
CVE-2012-6708 affecting package ceph for versions less than 18.2.2-1
jQuery before 1.9.0 is vulnerable to Cross-site Scripting (XSS) attacks. The jQuery(strInput) function does not differentiate selectors from HTML in a reliable fashion. In vulnerable versions, jQuery determined whether the input was HTML by looking for the '<' character anywhere in the string, giving attackers more flexibility when attempting to construct a malicious payload. In fixed versions, jQuery only deems the input to be HTML if it explicitly starts with the '<' character, limiting exploitability only to attackers who can control the beginning of a string, which is far less common.
- Record
AZL-40951- CVSS 3.0
- 6.1 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
Show 15 moreShow less
OSVAZL-43897
6.1
CVE-2012-6708 affecting package python-httplib2 0.20.3-3
jQuery before 1.9.0 is vulnerable to Cross-site Scripting (XSS) attacks. The jQuery(strInput) function does not differentiate selectors from HTML in a reliable fashion. In vulnerable versions, jQuery determined whether the input was HTML by looking for the '<' character anywhere in the string, giving attackers more flexibility when attempting to construct a malicious payload. In fixed versions, jQuery only deems the input to be HTML if it explicitly starts with the '<' character, limiting exploitability only to attackers who can control the beginning of a string, which is far less common.
- Record
AZL-43897- CVSS 3.0
- 6.1 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
OSVAZL-44730
6.1
CVE-2012-6708 affecting package python-httplib2 0.20.3-3
jQuery before 1.9.0 is vulnerable to Cross-site Scripting (XSS) attacks. The jQuery(strInput) function does not differentiate selectors from HTML in a reliable fashion. In vulnerable versions, jQuery determined whether the input was HTML by looking for the '<' character anywhere in the string, giving attackers more flexibility when attempting to construct a malicious payload. In fixed versions, jQuery only deems the input to be HTML if it explicitly starts with the '<' character, limiting exploitability only to attackers who can control the beginning of a string, which is far less common.
- Record
AZL-44730- CVSS 3.0
- 6.1 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
OSVAZL-44937
6.1
CVE-2012-6708 affecting package python-blinker for versions less than 1.7.0-4
jQuery before 1.9.0 is vulnerable to Cross-site Scripting (XSS) attacks. The jQuery(strInput) function does not differentiate selectors from HTML in a reliable fashion. In vulnerable versions, jQuery determined whether the input was HTML by looking for the '<' character anywhere in the string, giving attackers more flexibility when attempting to construct a malicious payload. In fixed versions, jQuery only deems the input to be HTML if it explicitly starts with the '<' character, limiting exploitability only to attackers who can control the beginning of a string, which is far less common.
- Record
AZL-44937- CVSS 3.0
- 6.1 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
OSV
6.1
jQuery before 1.9.0 is vulnerable to Cross-site Scripting (XSS) attacks. The jQuery(strInput) function does not differentiate selectors from HTML in a reliable fashion. In vulnerable versions, jQuery determined whether the input was HTML by looking for the '<' character anywhere in the string, giving attackers more flexibility when attempting to construct a malicious payload. In fixed versions, jQuery only deems the input to be HTML if it explicitly starts with the '<' character, limiting exploitability only to attackers who can control the beginning of a string, which is far less common.
- Record
CVE-2012-6708- CVSS 3.0
- 6.1 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
OSVGHSA-2pqj-h3vj-pqgw
6.1
Cross-Site Scripting in jquery
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.
- Record
GHSA-2pqj-h3vj-pqgw- CVSS 3.0
- 6.1 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-64, CWE-79
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2012-6708
6.1
jQuery before 1.9.0 is vulnerable to Cross-site Scripting (XSS) attacks. The jQuery(strInput) function does not differentiate selectors from HTML in a reliable fashion. In vulnerable versions, jQuery determined whether the input was HTML by looking for the '<' character anywhere in the string, giving attackers more flexibility when attempting to construct a malicious payload. In fixed versions, jQuery only deems the input to be HTML if it explicitly starts with the '<' character, limiting exploitability only to attackers who can control the beginning of a string, which is far less common.
- Record
UBUNTU-CVE-2012-6708- CVSS 3.0
- 6.1 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
OSVCLSA-2026-1777336744 No score
TuxCare security update for jquery (1 CVE)
TuxCare rebuilt jquery to address 1 CVE. Fixed in 1.8.2-tuxcare.2.
- Record
CLSA-2026-1777336744- Updated
- 2026-11-02
OSVCLSA-2026-1787557579 No score
TuxCare security update for jquery (6 CVEs)
TuxCare rebuilt jquery to address 6 CVEs. Fixed in 1.8.3-tuxcare.1.
- Record
CLSA-2026-1787557579- Updated
- 2026-11-02
OSVCLSA-2026-1787916782 No score
TuxCare security update for jquery (7 CVEs)
TuxCare rebuilt jquery to address 7 CVEs. Fixed in 1.4.1-tuxcare.1.
- Record
CLSA-2026-1787916782- Updated
- 2026-11-02
OSVCLSA-2026-1787920143 No score
TuxCare security update for jquery (8 CVEs)
TuxCare rebuilt jquery to address 8 CVEs. Fixed in 1.4.2-tuxcare.1.
- Record
CLSA-2026-1787920143- Updated
- 2026-11-02
OSVCLSA-2026-1787920316 No score
TuxCare security update for jquery (7 CVEs)
TuxCare rebuilt jquery to address 7 CVEs. Fixed in 1.4.3-tuxcare.1.
- Record
CLSA-2026-1787920316- Updated
- 2026-11-02
OSVCLSA-2026-1788956475 No score
TuxCare security update for jquery (6 CVEs)
TuxCare rebuilt jquery to address 6 CVEs. Fixed in 1.3.2-tuxcare.1.
- Record
CLSA-2026-1788956475- Updated
- 2026-11-02
OSVopenSUSE-SU-2020:0395-1 No score
Recommended update for ruby2.5
This update for ruby2.5 toversion 2.5.7 fixes the following issues:
ruby 2.5 was updated to version 2.5.7
- CVE-2020-8130: Fixed a command injection in intree copy of rake (bsc#1164804).
- CVE-2019-16255: Fixed a code injection vulnerability of Shell#[] and Shell#test (bsc#1152990).
- CVE-2019-16254: Fixed am HTTP response splitting in WEBrick (bsc#1152992).
- CVE-2019-15845: Fixed a null injection vulnerability of File.fnmatch and File.fnmatch? (bsc#1152994).
- CVE-2019-16201: Fixed a regular expression denial of service of WEBrick Digest access authentication (bsc#1152995).
- CVE-2012-6708: Fixed an XSS in JQuery
- CVE-2015-9251: Fixed an XSS in JQuery
- Fixed unit tests (bsc#1140844)
- Removed some unneeded test files (bsc#1162396).
This update was imported from the SUSE:SLE-15:Update update project.
- Record
openSUSE-SU-2020:0395-1- Updated
- 2026-11-02
OSVSUSE-SU-2020:0737-1 No score
Recommended update for ruby2.5
This update for ruby2.5 toversion 2.5.7 fixes the following issues:
ruby 2.5 was updated to version 2.5.7
- CVE-2020-8130: Fixed a command injection in intree copy of rake (bsc#1164804).
- CVE-2019-16255: Fixed a code injection vulnerability of Shell#[] and Shell#test (bsc#1152990).
- CVE-2019-16254: Fixed am HTTP response splitting in WEBrick (bsc#1152992).
- CVE-2019-15845: Fixed a null injection vulnerability of File.fnmatch and File.fnmatch? (bsc#1152994).
- CVE-2019-16201: Fixed a regular expression denial of service of WEBrick Digest access authentication (bsc#1152995).
- CVE-2012-6708: Fixed an XSS in JQuery
- CVE-2015-9251: Fixed an XSS in JQuery
- Fixed unit tests (bsc#1140844)
- Removed some unneeded test files (bsc#1162396).
- Record
SUSE-SU-2020:0737-1- Updated
- 2026-11-02
OSVUSN-7622-1 No score
jquery vulnerabilities
It was discovered that jQuery did not correctly handle HTML tags. An attacker could possibly use this issue to execute a cross-site scripting (XSS) attack. This issue only affected Ubuntu 14.04 LTS. (CVE-2012-6708)
It was discovered that jQuery did not correctly handle unsanitized source objects due to prototype pollution. An attacker could possibly use this issue to execute a cross-site scripting (XSS) attack. (CVE-2019-11358)
Masato Kinugawa discovered that jQuery did not correctly sanitize certain HTML elements. An attacker could possibly use this issue to execute a cross-site scripting (XSS) attack. This issue only affected Ubuntu 16.04 LTS and Ubuntu 18.04 LTS. (CVE-2020-11022)
Masato Kinugawa discovered that jQuery did not correctly sanitize certain HTML elements. An attacker could possibly use this issue to execute a cross-site scripting (XSS) attack. This issue only affected Ubuntu 18.04 LTS. (CVE-2020-11023)
- Record
USN-7622-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
jquerynpm |
through 1.8.3 | 1.9.0 |
org.webjars.npm:jqueryMaven |
through 1.8.3 | 1.9.0 |
jQueryNuGet |
through 1.8.3 | 1.9.0 |
jquery-railsRubyGems |
before 2.2.0 | 2.2.0 |
rubyAlpine:v3.10 |
before 2.5.6-r0 | 2.5.6-r0 |
cephAzure Linux:3 |
before 18.2.2-1 | 18.2.2-1 |
python-httplib2Azure Linux:2 |
through 0.20.3-3 | None known |
python-httplib2Azure Linux:3 |
through 0.20.3-3 | None known |
python-blinkerAzure Linux:3 |
before 1.7.0-4 | 1.7.0-4 |
jqueryTuxCare:npm |
1.8.2-tuxcare.0 up to 1.8.2-tuxcare.2, plus listed versions 1.8.21.8.2-tuxcare.1 |
1.8.2-tuxcare.2 |
Show 18 moreShow less
| Package | Affected | Fixed |
|---|---|---|
jqueryTuxCare:npm |
1.8.3-tuxcare.0 up to 1.8.3-tuxcare.1, plus listed versions 1.8.3 |
1.8.3-tuxcare.1 |
jqueryTuxCare:npm |
1.4.1-tuxcare.0 up to 1.4.1-tuxcare.1, plus listed versions 1.4.1 |
1.4.1-tuxcare.1 |
jqueryTuxCare:npm |
1.4.2-tuxcare.0 up to 1.4.2-tuxcare.1, plus listed versions 1.4.2 |
1.4.2-tuxcare.1 |
jqueryTuxCare:npm |
1.4.3-tuxcare.0 up to 1.4.3-tuxcare.1, plus listed versions 1.4.3 |
1.4.3-tuxcare.1 |
jqueryTuxCare:npm |
1.3.2-tuxcare.0 up to 1.3.2-tuxcare.1, plus listed versions 1.3.2 |
1.3.2-tuxcare.1 |
jquerynpm |
before 1.9.0 | 1.9.0 |
org.webjars.npm:jqueryMaven |
before 1.9.0, plus listed versions 1.7.21.7.31.8.21.8.3 |
1.9.0 |
jQueryNuGet |
before 1.9.0, plus listed versions 1.4.11.4.21.4.31.4.41.5.0 Show 15 moreShow less1.5.11.5.21.6.01.6.11.6.21.6.31.6.41.7.01.7.11.7.1.11.7.21.8.01.8.11.8.21.8.3 |
1.9.0 |
jquery-railsRubyGems |
before 2.2.0, plus listed versions 0.1.10.1.20.1.30.20.2.1 Show 35 moreShow less0.2.20.2.30.2.40.2.50.2.60.2.71.01.0.11.0.101.0.111.0.121.0.131.0.141.0.151.0.161.0.171.0.181.0.191.0.21.0.31.0.41.0.51.0.61.0.71.0.81.0.91.0.rc2.0.12.0.22.0.32.1.02.1.12.1.22.1.32.1.4 |
2.2.0 |
ruby2.5SUSE:Linux Enterprise Module for Basesystem 15 SP1 |
before 2.5.7-4.8.1 | 2.5.7-4.8.1 |
ruby2.5SUSE:Linux Enterprise High Performance Computing 15-ESPOS |
before 2.5.7-4.8.1 | 2.5.7-4.8.1 |
ruby2.5SUSE:Linux Enterprise High Performance Computing 15-LTSS |
before 2.5.7-4.8.1 | 2.5.7-4.8.1 |
ruby2.5SUSE:Linux Enterprise Server 15-LTSS |
before 2.5.7-4.8.1 | 2.5.7-4.8.1 |
ruby2.5SUSE:Linux Enterprise Server for SAP Applications 15 |
before 2.5.7-4.8.1 | 2.5.7-4.8.1 |
jqueryUbuntu:Pro:14.04:LTS |
before 1.7.2+dfsg-2ubuntu1+esm1, plus listed versions 1.7.2+dfsg-2ubuntu1 |
1.7.2+dfsg-2ubuntu1+esm1 |
jqueryUbuntu:Pro:16.04:LTS |
before 1.11.3+dfsg-4ubuntu0.1~esm1, plus listed versions 1.7.2+dfsg-3ubuntu21.11.3+dfsg-4 |
1.11.3+dfsg-4ubuntu0.1~esm1 |
jqueryUbuntu:Pro:18.04:LTS |
before 3.2.1-1ubuntu0.1~esm1, plus listed versions 3.1.1-23.2.1-1 |
3.2.1-1ubuntu0.1~esm1 |
ruby2.5openSUSE:Leap 15.1 |
before 2.5.7-lp151.4.6.1 | 2.5.7-lp151.4.6.1 |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| Exploit-DB | Linksys EA7500 2.0.8.194281 - Cross-Site Scripting | 2021-03-25 |
History
| When | Changed | Sources |
|---|---|---|
| 2026-11-03 | aliases | EUVD |
| 2026-11-02 | created | CVE List, Exploit-DB, GitHub Advisories, NVD, OSV |
References
snyk.io/vuln/npm:jquery:20120206
bugs.jquery.com/ticket/11290
github.com/jquery/jquery/commit/05531fc4080ae24070930d15ae0cea7ae056457d
help.ecostruxureit.com/display/public/UADCE725/Security+fixes+in+StruxureWare+Data+Center+Expert+v7.6.0
securityfocus.com/bid/102792
packetstormsecurity.com/files/153237/RetireJS-CORS-Issue-Script-Execution.html
Show 44 moreShow less
lists.apache.org/thread.html/b0656d359c7d40ec9f39c8cc61bca66802ef9a2a12ee199f5b0c1442%40%3Cdev.drill.apache.org%3E
lists.apache.org/thread.html/519eb0fd45642dcecd9ff74cb3e71c20a4753f7d82e2f07864b5108f%40%3Cdev.drill.apache.org%3E
lists.apache.org/thread.html/f9bc3e55f4e28d1dcd1a69aae6d53e609a758e34d2869b4d798e13cc%40%3Cissues.drill.apache.org%3E
lists.opensuse.org/opensuse-security-announce/2020-03/msg00041.html
packetstormsecurity.com/files/161972/Linksys-EA7500-2.0.8.194281-Cross-Site-Scripting.html
bugs.jquery.com/ticket/12531
bugs.jquery.com/ticket/6429
bugs.jquery.com/ticket/9521
nvd.nist.gov/vuln/detail/CVE-2017-16011
nvd.nist.gov/vuln/detail/CVE-2012-6708
lists.apache.org/thread.html/519eb0fd45642dcecd9ff74cb3e71c20a4753f7d82e2f07864b5108f@%3Cdev.drill.apache.org%3E
lists.apache.org/thread.html/b0656d359c7d40ec9f39c8cc61bca66802ef9a2a12ee199f5b0c1442@%3Cdev.drill.apache.org%3E
lists.apache.org/thread.html/f9bc3e55f4e28d1dcd1a69aae6d53e609a758e34d2869b4d798e13cc@%3Cissues.drill.apache.org%3E
security.snyk.io/vuln/SNYK-DOTNET-JQUERY-450223
research.insecurelabs.org/jquery/test
web.archive.org/web/20200227132049/http://www.securityfocus.com/bid/102792
github.com/rails/jquery-rails/blob/v2.1.4/vendor/assets/javascripts/jquery.js
github.com/rails/jquery-rails/blob/v2.2.0/vendor/assets/javascripts/jquery.js
github.com/rubysec/ruby-advisory-db/blob/master/gems/jquery-rails/CVE-2012-6708.yml
github.com/advisories/GHSA-2pqj-h3vj-pqgw
security.alpinelinux.org/vuln/CVE-2012-6708
github.com/jquery/jquery
suse.com/support/update/announcement/2020/suse-su-20200737-1
bugzilla.suse.com/1140844
bugzilla.suse.com/1152990
bugzilla.suse.com/1152992
bugzilla.suse.com/1152994
bugzilla.suse.com/1152995
bugzilla.suse.com/1162396
bugzilla.suse.com/1164804
suse.com/security/cve/CVE-2012-6708
suse.com/security/cve/CVE-2015-9251
suse.com/security/cve/CVE-2019-15845
suse.com/security/cve/CVE-2019-16201
suse.com/security/cve/CVE-2019-16254
suse.com/security/cve/CVE-2019-16255
suse.com/security/cve/CVE-2020-8130
ubuntu.com/security/CVE-2012-6708
cve.org/CVERecord?id=CVE-2012-6708
ubuntu.com/security/notices/USN-7622-1
ubuntu.com/security/CVE-2019-11358
ubuntu.com/security/CVE-2020-11022
ubuntu.com/security/CVE-2020-11023
lists.opensuse.org/archives/list/[email protected]/thread/ZJAMCVFC2KL342QI4W5HGYIZXTNBURQT