# CVE-2020-7656: Cross-Site Scripting in jquery

> An attacker can execute arbitrary scripts in a victim's browser via the jQuery load method due to improper tag filtering.

- **Severity:** Medium 6.1 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 19 May 2020
- **Updated:** 4 Aug 2024
- **Also known as:** GHSA-q4m3-2j7h-f7xw, SNYK-JS-JQUERY-569619, UBUNTU-CVE-2020-7656

## What is CVE-2020-7656?

CVE-2020-7656 is a medium-severity cross-site scripting vulnerability in Juniper Junos, published on 19 May 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

jquery prior to 1.9.0 allows Cross-site Scripting attacks via the load method. The load method fails to recognize and remove "<script>" HTML tags that contain a whitespace character, i.e: "</script >", which results in the enclosed script logic to be executed.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2020-7656?

8 open source packages ship an affected version, including org.webjars.npm:jquery, jQuery and jquery-rails. It affects 7 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.webjars.npm:jquery` | Maven | From 1.2.1 | 1.9.0 |
| `org.webjars.npm:jquery` | Maven | From 1.2.1 | 1.9.0 |
| `jQuery` | NuGet | From 1.2.1 | 1.9.0 |
| `jQuery` | NuGet | From 1.2.1 | 1.9.0 |
| `jquery-rails` | RubyGems | All versions | 2.2.0 |
| `jquery-rails` | RubyGems | All versions | 2.2.0 |
| `jquery` | npm | From 1.2.1 | 1.9.0 |
| `jquery` | npm | From 1.2.1 | 1.9.0 |

Products: Jquery Jquery, Juniper Junos, Netapp Active Iq Unified Manager, Netapp Cloud Backup, Netapp Oncommand System Manager, Netapp Snap Creator Framework, Oracle Peoplesoft Enterprise Peopletools.

## How do I fix CVE-2020-7656?

Upgrade org.webjars.npm:jquery to 1.9.0 or later.

## Is CVE-2020-7656 being exploited?

There is no known exploitation of CVE-2020-7656 in the wild and no public exploit code.

Public exploit code:

- jQuery 3.3.1 - Prototype Pollution & XSS Exploit (exploitdb)

## Other vulnerabilities in Juniper Junos

- [CVE-2016-10707](https://insights.sbomify.com/CVE-2016-10707/): Denial of Service in jquery (high 7.5)
- [CVE-2018-18405](https://insights.sbomify.com/CVE-2018-18405/): Cross-site scripting in n/a (medium 6.1)
- [CVE-2012-6708](https://insights.sbomify.com/CVE-2012-6708/): Cross-Site Scripting in jquery (medium 6.1)
- [CVE-2015-9251](https://insights.sbomify.com/CVE-2015-9251/): Cross-Site Scripting (XSS) in jquery (medium 6.1)
- [CVE-2014-6071](https://insights.sbomify.com/CVE-2014-6071/): Cross-site scripting in n/a (medium 6.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-7656 and fix it if it is affected.

What it is: CVE-2020-7656 is a medium-severity cross-site scripting vulnerability in Juniper Junos, published on 19 May 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2020-7656 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.webjars.npm:jquery (Maven): affected from 1.2.1; fixed in 1.9.0
- org.webjars.npm:jquery (Maven): affected from 1.2.1; fixed in 1.9.0
- jQuery (NuGet): affected from 1.2.1; fixed in 1.9.0
- jQuery (NuGet): affected from 1.2.1; fixed in 1.9.0
- jquery-rails (RubyGems): affected all versions; fixed in 2.2.0
- jquery-rails (RubyGems): affected all versions; fixed in 2.2.0
- jquery (npm): affected from 1.2.1; fixed in 1.9.0
- jquery (npm): affected from 1.2.1; fixed in 1.9.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2020-7656/ (Markdown: https://insights.sbomify.com/CVE-2020-7656/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2020-7656
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2020-7656
- OSV: https://osv.dev/vulnerability/CVE-2020-7656

---
From sbomify Insights: https://insights.sbomify.com/CVE-2020-7656/
Summaries are generated and may contain mistakes; the official description above is the record.
