# CVE-2024-25712: http-swagger XSS via PUT requests

- Severity: Medium 6.1 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.56%, higher than 48% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-04-22T20:55:52.000Z
- Modified: 2026-06-17T07:16:27.340Z
- Also known as: GHSA-49w7-5r33-jm9m, GHSA-xg75-q3q5-cqmv, GO-2022-0427
- Related: CVE-2022-24863
- Weaknesses: CWE-79, CWE-400, CWE-755
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: mitre

## 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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- github.com/swaggo/http-swagger (Go): before 1.2.6
- http-swagger_project http-swagger: before 1.2.6

## Every score

- CISA-ADP: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://cosmosofcyberspace.github.io/improper_http_method_leads_to_xss/poc.html> (exploit, third-party-advisory, web)
- <https://github.com/swaggo/http-swagger/releases/tag/v1.2.6> (release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-25712> (advisory)
- <https://github.com/swaggo/http-swagger/pull/62> (fix, web)
- <https://github.com/swaggo/http-swagger/commit/b7d83e8fba85a7a51aa7e45e8244b4173f15049e> (web)
- <https://github.com/swaggo/http-swagger> (package)
- <https://github.com/swaggo/http-swagger/security/advisories/GHSA-xg75-q3q5-cqmv> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-24863> (advisory)
- <https://github.com/swaggo/http-swagger/issues/61> (report)

## Sources

- CVE List: [CVE-2024-25712](https://www.cve.org/CVERecord?id=CVE-2024-25712), CVE Terms of Use, modified 2025-06-16
- GitHub Advisory Database: [GHSA-49w7-5r33-jm9m](https://github.com/advisories/GHSA-49w7-5r33-jm9m), CC-BY-4.0, modified 2025-01-16
- GitHub Advisory Database: [GHSA-xg75-q3q5-cqmv](https://github.com/advisories/GHSA-xg75-q3q5-cqmv), CC-BY-4.0, modified 2024-03-04
- Go Vulnerability Database: [GO-2022-0427](https://pkg.go.dev/vuln/GO-2022-0427), CC-BY-4.0, modified 2024-05-20
- NVD: [CVE-2024-25712](https://nvd.nist.gov/vuln/detail/CVE-2024-25712), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-25712 · Whole record: https://cve.day/CVE-2024-25712.json · Rebuilt by cve.day 2026-11-25T22:58:37.169Z
