Vulnerability · Published Feb 11, 2024 · Assigned by mitre
CVE-2024-25712
Medium 6.1
In plain English
A medium-severity cross-site scripting in the github.com/swaggo/http-swagger package (Go). There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 47% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
http-swagger before 1.2.6 allows XSS via PUT requests, because a file that has been uploaded (via httpSwagger.WrapHandler and *webdav.memFile) can subsequently be accessed via a GET request. NOTE: this is independently fixable with respect to CVE-2022-24863, because (if a solution continued to allow PUT requests) large files could have been blocked without blocking JavaScript, or JavaScript could have been blocked without blocking large files.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Go | github.com/swaggo/http-swagger | 1.2.6 | GHSA-49w7-5r33-jm9m |
| Go | github.com/swaggo/http-swagger | 1.2.6 | GHSA-xg75-q3q5-cqmv |
| Go | github.com/swaggo/http-swagger | 1.2.6 | GO-2022-0427 |
Affected products (as reported)
Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N