# GHSA-mpjf-8cmf-p789: Cross-Site Scripting in jingo

> An attacker can inject malicious scripts into wiki pages, leading to code execution in the victim's browser.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 1 Sep 2020

## What is GHSA-mpjf-8cmf-p789?

GHSA-mpjf-8cmf-p789 is a cross-site scripting vulnerability in jingo, published on 1 Sep 2020. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

Versions of `jingo` prior to 1.9.2 are vulnerable to Cross-Site Scripting (XSS). If malicious input such as `<script>alert(1)</script>` is placed in the content of a wiki page, Jingo does not properly encode the input and it is executed instead of rendered as text.

## Recommendation

Upgrade to version 1.9.2

## Which versions are affected by GHSA-mpjf-8cmf-p789?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `jingo` | npm | All versions | 1.9.2 |
| `jingo` | npm | All versions | 1.9.2 |

## How do I fix GHSA-mpjf-8cmf-p789?

Upgrade jingo to 1.9.2 or later.

## Is GHSA-mpjf-8cmf-p789 being exploited?

There is no known exploitation of GHSA-mpjf-8cmf-p789 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-mpjf-8cmf-p789 and fix it if it is affected.

What it is: GHSA-mpjf-8cmf-p789 is a cross-site scripting vulnerability in jingo, published on 1 Sep 2020. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of GHSA-mpjf-8cmf-p789 in the wild and no public exploit code.

Affected packages and fixed versions:
- jingo (npm): affected all versions; fixed in 1.9.2
- jingo (npm): affected all versions; fixed in 1.9.2

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-mpjf-8cmf-p789/ (Markdown: https://insights.sbomify.com/GHSA-mpjf-8cmf-p789/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-mpjf-8cmf-p789

---
From sbomify Insights: https://insights.sbomify.com/GHSA-mpjf-8cmf-p789/
Summaries are generated and may contain mistakes; the official description above is the record.
