# GHSA-frm9-7pm9-5rgc: SilverStripe comments module includes version of jQuery vulnerable to Cross-site Scripting

> Outdated jQuery in SilverStripe comments module and themes allows XSS if user input is mishandled, requiring an upgrade to patched versions.

- **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:** 27 May 2024

## What is GHSA-frm9-7pm9-5rgc?

GHSA-frm9-7pm9-5rgc is a cross-site scripting vulnerability in silverstripe/comments, published on 27 May 2024. 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

The silverstripe/comments module, the cwp/starter-theme and the cwp/watea-theme include an outdated version of jQuery by default, which contains XSS vulnerabilities if user input is used in certain contexts. Though no known exploit has been found for these in the existing usage, user customisation to these themes could have made them exploitable.

CWP 2.0.0 has been released with the fixed cwp/stater-theme and silverstripe/comments module, and SilverStripe 4.2.0 will be released with the fixed silverstripe-themes/simple theme.

## Which versions are affected by GHSA-frm9-7pm9-5rgc?

2 open source packages ship an affected version, including silverstripe/comments.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `silverstripe/comments` | Packagist | From 1.3.0 | 3.1.1 |
| `silverstripe/comments` | Packagist | From 1.3.0 | 3.1.1 |

## How do I fix GHSA-frm9-7pm9-5rgc?

Upgrade silverstripe/comments to 3.1.1 or later.

## Is GHSA-frm9-7pm9-5rgc being exploited?

There is no known exploitation of GHSA-frm9-7pm9-5rgc in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-frm9-7pm9-5rgc and fix it if it is affected.

What it is: GHSA-frm9-7pm9-5rgc is a cross-site scripting vulnerability in silverstripe/comments, published on 27 May 2024. 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-frm9-7pm9-5rgc in the wild and no public exploit code.

Affected packages and fixed versions:
- silverstripe/comments (Packagist): affected from 1.3.0; fixed in 3.1.1
- silverstripe/comments (Packagist): affected from 1.3.0; fixed in 3.1.1

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-frm9-7pm9-5rgc/ (Markdown: https://insights.sbomify.com/GHSA-frm9-7pm9-5rgc/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-frm9-7pm9-5rgc

---
From sbomify Insights: https://insights.sbomify.com/GHSA-frm9-7pm9-5rgc/
Summaries are generated and may contain mistakes; the official description above is the record.
