Every CVE Search/ Get API key

CVE-2012-6708

Cross-Site Scripting in jquery

6.1 MediumPublic exploitFix available

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

8.63%Up 3.8 points since Feb 4, 2022
90%50%10%1%

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 MediumCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
CVSS 2.0
4.3 MediumAV: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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

Affected packages
PackageAffectedFixed
jquery
npm
through 1.8.3
1.9.0
org.webjars.npm:jquery
Maven
through 1.8.3
1.9.0
jQuery
NuGet
through 1.8.3
1.9.0
jquery-rails
RubyGems
before 2.2.0
2.2.0
ruby
Alpine:v3.10
before 2.5.6-r0
2.5.6-r0
ceph
Azure Linux:3
before 18.2.2-1
18.2.2-1
python-httplib2
Azure Linux:2
through 0.20.3-3 None known
python-httplib2
Azure Linux:3
through 0.20.3-3 None known
python-blinker
Azure Linux:3
before 1.7.0-4
1.7.0-4
jquery
TuxCare: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
Affected packages
PackageAffectedFixed
jquery
TuxCare:npm
1.8.3-tuxcare.0 up to 1.8.3-tuxcare.1, plus listed versions
1.8.3
1.8.3-tuxcare.1
jquery
TuxCare:npm
1.4.1-tuxcare.0 up to 1.4.1-tuxcare.1, plus listed versions
1.4.1
1.4.1-tuxcare.1
jquery
TuxCare:npm
1.4.2-tuxcare.0 up to 1.4.2-tuxcare.1, plus listed versions
1.4.2
1.4.2-tuxcare.1
jquery
TuxCare:npm
1.4.3-tuxcare.0 up to 1.4.3-tuxcare.1, plus listed versions
1.4.3
1.4.3-tuxcare.1
jquery
TuxCare:npm
1.3.2-tuxcare.0 up to 1.3.2-tuxcare.1, plus listed versions
1.3.2
1.3.2-tuxcare.1
jquery
npm
before 1.9.0
1.9.0
org.webjars.npm:jquery
Maven
before 1.9.0, plus listed versions
1.7.21.7.31.8.21.8.3
1.9.0
jQuery
NuGet
before 1.9.0, plus listed versions
1.4.11.4.21.4.31.4.41.5.0
Show 15 moreShow less
1.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-rails
RubyGems
before 2.2.0, plus listed versions
0.1.10.1.20.1.30.20.2.1
Show 35 moreShow less
0.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.5
SUSE:Linux Enterprise Module for Basesystem 15 SP1
before 2.5.7-4.8.1
2.5.7-4.8.1
ruby2.5
SUSE:Linux Enterprise High Performance Computing 15-ESPOS
before 2.5.7-4.8.1
2.5.7-4.8.1
ruby2.5
SUSE:Linux Enterprise High Performance Computing 15-LTSS
before 2.5.7-4.8.1
2.5.7-4.8.1
ruby2.5
SUSE:Linux Enterprise Server 15-LTSS
before 2.5.7-4.8.1
2.5.7-4.8.1
ruby2.5
SUSE:Linux Enterprise Server for SAP Applications 15
before 2.5.7-4.8.1
2.5.7-4.8.1
jquery
Ubuntu: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
jquery
Ubuntu: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
jquery
Ubuntu: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.5
openSUSE: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.

Public exploits
SourceLinkDate
Exploit-DBLinksys EA7500 2.0.8.194281 - Cross-Site Scripting2021-03-25

History

History
WhenChangedSources
2026-11-03aliasesEUVD
2026-11-02createdCVE List, Exploit-DB, GitHub Advisories, NVD, OSV

References

Show 44 moreShow less
MoveEnter Open