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

CVE-2025-62406

CVE-2025-62406 Supply Chain Attack in Piwigo
📅 PUBLISHED: 2025-11-18 22:18 UTC 🔄 UPDATED: 2026-09-23 20:16 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the 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.40%
👁️
0.40% probability
10.1× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: version not auto-detected — verify your deployed version locally
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
8.1
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-62406 is a host header injection vulnerability in Piwigo, a popular open-source photo gallery application. The flaw resides in the password reset functionality of Piwigo version 15.6.0. When a user requests a password reset, the application constructs the reset URL using the Host header from the incoming HTTP request without any validation. An attacker who knows or can guess a valid username or email address can craft a malicious Host header, causing the password reset link to point to an attacker-controlled domain. If the victim clicks this link, they are redirected to the attacker's site, where credentials or a session token can be harvested. The vulnerability has a CVSS score of 8.1 (High) and is patched in version 15.7.0.

⚡ 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

This vulnerability is not related to a package manager (NPM, PyPI, Go, Ruby) but is a direct application-level flaw in the Piwigo web application. The risk is primarily to self-hosted Piwigo instances. No supply chain compromise is involved.

CVSS Breakdown & Threat Level

  • CVSS Score: 8.1 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
  • Attack Vector (AV): Network (N) - Exploitable remotely.
  • Attack Complexity (AC): Low (L) - No special conditions required.
  • Privileges Required (PR): None (N) - No authentication needed to trigger the reset.
  • User Interaction (UI): Required (R) - The victim must click the malicious link.
  • Scope (S): Changed (C) - The impact extends beyond the vulnerable component.
  • Confidentiality (C): Low (L) - Limited information disclosure (e.g., session token).
  • Integrity (I): Low (L) - Limited ability to modify data (e.g., redirect to phishing page).
  • Availability (A): None (N) - No impact on availability.

Threat Level: High. The attack is easy to execute, requires no privileges, and can lead to account takeover via credential phishing or session hijacking.

Deep Dive & Mechanics

The vulnerability is a classic Host Header Injection (CWE-601: URL Redirection to Untrusted Site). The password reset flow in Piwigo 15.6.0 works as follows:

  1. A user navigates to the password reset page and enters a username or email address.
  2. The application looks up the user and generates a unique, time-limited reset token.
  3. The application constructs the password reset URL by concatenating the Host header from the HTTP request with the reset path (e.g., https://[Host]/password_reset.php?token=...).
  4. This URL is then sent to the user's email address.

The flaw is that the Host header is taken directly from the request without any sanitization or validation. An attacker can intercept or craft an HTTP request to the password reset endpoint with a modified Host header, such as attacker.com. The resulting email will contain a link like https://attacker.com/password_reset.php?token=.... If the victim clicks this link, they are redirected to the attacker's domain, where the attacker can serve a fake login page to capture credentials or steal the reset token.

Attack Scenario:

  1. Attacker identifies a Piwigo instance (e.g., via Shodan).
  2. Attacker knows or guesses a valid username (e.g., "admin").
  3. Attacker sends a POST request to /password_reset.php with Host: attacker.com and username=admin.
  4. Piwigo sends an email to the admin with a reset link pointing to https://attacker.com/password_reset.php?token=abc123.
  5. The admin clicks the link, thinking it's legitimate.
  6. The attacker's server captures the token and uses it to reset the admin's password, gaining full control.

Vulnerable vs. Patched Code

Vulnerable Code (Piwigo 15.6.0): The vulnerable code is typically in the password reset handler. A simplified example:

// Vulnerable: Host header used directly
$reset_url = 'https://' . $_SERVER['HTTP_HOST'] . '/password_reset.php?token=' . $token;
mail($user_email, 'Password Reset', 'Click here: ' . $reset_url);

Patched Code (Piwigo 15.7.0): The fix validates the Host header against a whitelist of allowed hostnames (e.g., the server's configured domain name).

// Patched: Validate Host header
$allowed_hosts = ['example.com', 'www.example.com']; // Configured list
$host = $_SERVER['HTTP_HOST'];
if (!in_array($host, $allowed_hosts)) {
    // Log or reject
    die('Invalid host');
}
$reset_url = 'https://' . $host . '/password_reset.php?token=' . $token;
mail($user_email, 'Password Reset', 'Click here: ' . $reset_url);

Exploitation & Lab Setup

Red Team (Attack Simulation)

Prerequisites:

  • A vulnerable Piwigo 15.6.0 instance (e.g., Docker container).
  • A known valid username (e.g., "admin").
  • An attacker-controlled domain or server to receive the redirect.

Exploitation Steps:

  1. Identify Target: Use Shodan or manual browsing to find Piwigo instances.
  2. Craft Request: Use curl to send a password reset request with a malicious Host header.
    curl -X POST http://target-piwigo.com/password_reset.php \
      -H "Host: attacker.com" \
      -d "username=admin"
    
  3. Wait for Email: The victim will receive an email with a link to https://attacker.com/password_reset.php?token=....
  4. Capture Token: Set up a simple HTTP server on attacker.com to log the token.
    python3 -m http.server 80
    
  5. Use Token: Once the token is captured, use it to reset the victim's password.
    curl -X POST http://target-piwigo.com/password_reset.php \
      -d "token=CAPTURED_TOKEN&new_password=NewP@ss123"
    

Blue Team (Defense & Detection)

Detection:

  • Monitor for unusual Host headers in HTTP requests, especially to /password_reset.php.
  • Look for multiple password reset requests from the same IP in a short time.
  • Alert on emails containing links to external domains that are not the legitimate Piwigo domain.

Mitigation:

  • Immediately upgrade to Piwigo 15.7.0 or later.
  • Implement a Web Application Firewall (WAF) rule to block requests with suspicious Host headers.
  • Use a reverse proxy (e.g., Nginx) to validate the Host header before it reaches the application.
  • Educate users to verify the sender's email address and the link domain before clicking.

Indicators of Compromise (IOCs)

  • Network:
    • HTTP requests to /password_reset.php with a Host header that does not match the legitimate domain.
    • Outbound emails from the Piwigo server containing links to external, untrusted domains.
  • Logs:
    • Web server logs showing Host header values that are not the expected domain.
    • Email server logs showing password reset emails sent to users with unusual link domains.
  • File System:
    • No specific file-based IOCs; the attack is purely network-based.

Detection Engineering

YARA Rule

rule CVE_2025_62406_Piwigo_Host_Header_Injection {
    meta:
        description = "Detects suspicious Host header in password reset requests to Piwigo"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-62406"
    strings:
        $reset_path = "/password_reset.php"
        $host_header = "Host:"
    condition:
        $reset_path and $host_header and not for any of them : ( $host_header contains "legitimate-domain.com" )
}

Sigma Rule

title: Piwigo Host Header Injection in Password Reset
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects HTTP requests to Piwigo password reset with a modified Host header
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-uri-stem: '/password_reset.php'
        cs-host: 'attacker.com'  # Replace with known malicious domains
    condition: selection
falsepositives:
    - Legitimate domain changes (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-62406 Piwigo Host Header Injection"; flow:to_server; content:"/password_reset.php"; http_uri; content:"Host|3a|"; http_header; pcre:"/Host:\s*(?!legitimate-domain\.com)[^\r\n]+/i"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Upgrade: Update Piwigo to version 15.7.0 or later immediately.
  2. WAF Rule: Deploy a WAF rule to block requests to /password_reset.php where the Host header does not match the expected domain.
  3. Reverse Proxy: Configure Nginx or Apache to validate the Host header and reject invalid requests.
    server {
        listen 80;
        server_name legitimate-domain.com;
        if ($host != "legitimate-domain.com") {
            return 444;
        }
        # ... rest of config
    }
    

Long-Term Measures:

  • Implement a Content Security Policy (CSP) to restrict where forms can be submitted.
  • Use HTTPS with HSTS to prevent downgrade attacks.
  • Regularly audit and update all web application dependencies.
  • Conduct security training for users to recognize phishing attempts.

Valters IT Signature This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.

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