# CVE-2024-47605: Cross-site Scripting via insert media remote file oembed in silverstripe-asset-admin

> Attackers can execute arbitrary scripts in the CMS and front-end via unsanitized oEmbed HTML in the insert media feature.

- **Severity:** Medium 5.4 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/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:** 14 Jan 2025
- **Updated:** 15 Jan 2025
- **Also known as:** GHSA-7cmp-cgg8-4c82

## What is CVE-2024-47605?

CVE-2024-47605 is a medium-severity cross-site scripting vulnerability in silverstripe-asset-admin, published on 14 Jan 2025. 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

silverstripe-asset-admin is a silverstripe assets gallery for asset management. When using the "insert media" functionality, the linked oEmbed JSON includes an HTML attribute which will replace the embed shortcode. The HTML is not sanitized before replacing the shortcode, allowing a script payload to be executed on both the CMS and the front-end of the website. This issue has been addressed in silverstripe/framework version 5.3.8 and users are advised to upgrade. There are no known workarounds for this vulnerability.

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

## Which versions are affected by CVE-2024-47605?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `silverstripe/framework` | Packagist | All versions | 5.3.8 |
| `silverstripe/framework` | Packagist | All versions | 5.3.8 |

## How do I fix CVE-2024-47605?

Upgrade silverstripe/framework to 5.3.8 or later.

## Is CVE-2024-47605 being exploited?

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

Public exploit code:

- SilverStripe 5.3.8  - Stored Cross Site Scripting (XSS) (Authenticated) (exploitdb)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-47605 and fix it if it is affected.

What it is: CVE-2024-47605 is a medium-severity cross-site scripting vulnerability in silverstripe-asset-admin, published on 14 Jan 2025. 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-2024-47605 in the wild and no public exploit code.

Affected packages and fixed versions:
- silverstripe/framework (Packagist): affected all versions; fixed in 5.3.8
- silverstripe/framework (Packagist): affected all versions; fixed in 5.3.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/CVE-2024-47605/ (Markdown: https://insights.sbomify.com/CVE-2024-47605/index.md)
```

## Sources

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

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