GitHub Advisoryadvisory · Go

GHSA-49w7-5r33-jm9m http-swagger XSS via PUT requests

MEDIUM Published 2024-02-29 Modified 2025-01-16 Official page ↗
Aliases
CVE-2024-25712
Ecosystem
Go
Packages
github.com/swaggo/http-swagger
Severity
Moderate
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weaknesses
CWE-79
Reviewed
2024-02-29

Affected packages

• Go github.com/swaggo/http-swagger: < 1.2.6 → 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.

Related

Alias · CVE (1)

  • 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… vulnerability

Weakness · CWE (1)

  • CWE-79 Improper Neutralization of Input During Web Page Generation weakness

References