# GHSA-rrgw-3hg3-9x8c: XSS vulnerability in translations

> An admin can inject JavaScript into translation values, leading to XSS attacks when translations are enabled or installed.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 12 Jan 2022

## What is GHSA-rrgw-3hg3-9x8c?

GHSA-rrgw-3hg3-9x8c is a cross-site scripting vulnerability in oro/platform, published on 12 Jan 2022. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.

### Official description

### Summary

An attacker with admin privileges and access to Translations management functionality may add JS payload to translation values via: 
 - Translation management UI.
 - Translations downloaded via the Crowdin service may also contain JS strings used for XSS attacks, for a successful attack poisoned translation should be enabled, downloaded, and installed.
 - Translations uploaded via Upload translation file on the All Languages grid

### Workarounds

There are no workarounds that address this vulnerability.

## Which versions are affected by GHSA-rrgw-3hg3-9x8c?

6 open source packages ship an affected version, including oro/platform.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `oro/platform` | Packagist | From 3.1.0 | 3.1.29 |
| `oro/platform` | Packagist | From 3.1.0 | 3.1.29 |
| `oro/platform` | Packagist | From 4.1.0 | 4.1.17 |
| `oro/platform` | Packagist | From 4.1.0 | 4.1.17 |
| `oro/platform` | Packagist | From 4.2.0 | 4.2.8 |
| `oro/platform` | Packagist | From 4.2.0 | 4.2.8 |

## How do I fix GHSA-rrgw-3hg3-9x8c?

Upgrade oro/platform to a fixed version for your release line: 3.1.29, 4.1.17 or 4.2.8.

## Is GHSA-rrgw-3hg3-9x8c being exploited?

There is no known exploitation of GHSA-rrgw-3hg3-9x8c in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-rrgw-3hg3-9x8c and fix it if it is affected.

What it is: GHSA-rrgw-3hg3-9x8c is a cross-site scripting vulnerability in oro/platform, published on 12 Jan 2022. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of GHSA-rrgw-3hg3-9x8c in the wild and no public exploit code.

Affected packages and fixed versions:
- oro/platform (Packagist): affected from 3.1.0; fixed in 3.1.29
- oro/platform (Packagist): affected from 3.1.0; fixed in 3.1.29
- oro/platform (Packagist): affected from 4.1.0; fixed in 4.1.17
- oro/platform (Packagist): affected from 4.1.0; fixed in 4.1.17
- oro/platform (Packagist): affected from 4.2.0; fixed in 4.2.8
- oro/platform (Packagist): affected from 4.2.0; fixed in 4.2.8

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-rrgw-3hg3-9x8c/ (Markdown: https://insights.sbomify.com/GHSA-rrgw-3hg3-9x8c/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-rrgw-3hg3-9x8c

---
From sbomify Insights: https://insights.sbomify.com/GHSA-rrgw-3hg3-9x8c/
Summaries are generated and may contain mistakes; the official description above is the record.
