id: CVE-2025-62512

info:
  name: Piwigo - User Enumeration via Password Reset
  author: DhiyaneshDk
  severity: medium
  description: |
    Piwigo is an open source photo gallery application for the web. In version 15.5.0 and likely earlier 15.x releases, the password reset functionality in Piwigo allows an unauthenticated attacker to determine whether a given username or email address exists in the system. The endpoint at password.php?action=lost returns distinct messages for valid vs. invalid accounts, enabling user enumeration. As of time of publication, no known patches are available.
  impact: |
    Unauthenticated attackers can enumerate valid usernames or email addresses, aiding further targeted attacks.
  remediation: |
    Update to the latest version when available or apply mitigations to unify response messages.
  reference:
    - https://github.com/Piwigo/Piwigo/security/advisories/GHSA-h4wx-7m83-xfxc
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
    cvss-score: 5.3
    cve-id: CVE-2025-62512
    epss-score: 0.00766
    epss-percentile: 0.50653
    cwe-id: CWE-204
  metadata:
    verified: true
    max-request: 2
    vendor: piwigo
    product: piwigo
    shodan-query: http.html:"Piwigo"
    fofa-query: body="Piwigo"
  tags: cve,cve2025,piwigo,user-enum,exposure

flow: http(1) && http(2)

http:
  - raw:
      - |
        GET /password.php HTTP/1.1
        Host: {{Hostname}}

    extractors:
      - type: regex
        name: token
        part: body
        group: 1
        regex:
          - 'name="pwg_token"\s+value="([a-f0-9]+)"'
        internal: true

  - raw:
      - |
        POST /password.php?action=lost HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        pwg_token={{token}}&username_or_email=nonexistent-{{rand_int(10000,99999)}}@example.com&submit=Change+my+password

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "Invalid username or email"

      - type: status
        status:
          - 200
# digest: 4b0a00483046022100f671903cd87c2699f32d1044f87d1f94a83e044253ce070bd3f4aee9f5c9c5ae022100b4350afd19bddf6e9cfcbb796abab1a1a06374709d54a11f3c994b93ecd20129:922c64590222798bb761d5b6d8e72950