CVE-2024-25712 Cross-site scripting in n/a

Medium 6.1 Published Updated

An attacker can execute arbitrary JavaScript in a victim's browser by uploading a malicious file via PUT and accessing it via GET in the http-swagger library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2024-25712?

CVE-2024-25712 is a medium-severity cross-site scripting vulnerability in n/a, published on 11 Feb 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

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.

Weakness: CWE-79

Which versions are affected by CVE-2024-25712?

It affects 1 product.

Products include Http-Swagger Project Http-Swagger.

How do I fix CVE-2024-25712?

Upgrade to a fixed version.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2024-25712 being exploited?

There is no known exploitation of CVE-2024-25712 in the wild and no public exploit code.

Sources

Is CVE-2024-25712 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free