# GHSA-hgwm-pv9h-q5m7: Potential XSS in jQuery dependency in Mirador

> An XSS vulnerability in the jQuery dependency of Mirador allows attackers to execute arbitrary scripts in the context of the viewer.

- **Severity:** Not scored
- **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:** 18 Sep 2020

## What is GHSA-hgwm-pv9h-q5m7?

GHSA-hgwm-pv9h-q5m7 is a cross-site scripting vulnerability in mirador, published on 18 Sep 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

### Impact
Mirador users less than v3.0.0 (alpha-rc) versions that have an unpatched jQuery. When adopters update jQuery they will find some of Mirador functionality to be broken.

### Patches
Mirador adopters should update to v3.0.0, no updates exist for v2.x releases.

### Workarounds
Yes, Mirador users could fork and create their own custom build of Mirador and make the bug fixes themselves.

### References
https://github.com/advisories/GHSA-gxr4-xjj5-5px2
https://github.com/advisories/GHSA-jpcq-cgw6-v4j6

https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/
https://jquery.com/upgrade-guide/3.5/

## Which versions are affected by GHSA-hgwm-pv9h-q5m7?

2 open source packages ship an affected version, including mirador.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `mirador` | npm | All versions | 3.0.0-alpha.0 |
| `mirador` | npm | All versions | 3.0.0-alpha.0 |

## How do I fix GHSA-hgwm-pv9h-q5m7?

Upgrade mirador to 3.0.0-alpha.0 or later.

## Is GHSA-hgwm-pv9h-q5m7 being exploited?

There is no known exploitation of GHSA-hgwm-pv9h-q5m7 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-hgwm-pv9h-q5m7 and fix it if it is affected.

What it is: GHSA-hgwm-pv9h-q5m7 is a cross-site scripting vulnerability in mirador, published on 18 Sep 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 GHSA-hgwm-pv9h-q5m7 in the wild and no public exploit code.

Affected packages and fixed versions:
- mirador (npm): affected all versions; fixed in 3.0.0-alpha.0
- mirador (npm): affected all versions; fixed in 3.0.0-alpha.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/GHSA-hgwm-pv9h-q5m7/ (Markdown: https://insights.sbomify.com/GHSA-hgwm-pv9h-q5m7/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-hgwm-pv9h-q5m7

---
From sbomify Insights: https://insights.sbomify.com/GHSA-hgwm-pv9h-q5m7/
Summaries are generated and may contain mistakes; the official description above is the record.
