CVE-2025-8129 KoaJS Koa HTTP Header response.js back redirect

Medium 5.1 Published Updated

Attackers can exploit an open redirect in the KoaJS framework's HTTP header handler to redirect users to malicious sites.

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

What is CVE-2025-8129?

CVE-2025-8129 is a medium-severity vulnerability in KoaJS Koa, published on 25 Jul 2025. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

A vulnerability, which was classified as problematic, was found in KoaJS Koa up to 3.0.0. Affected is the function back in the library lib/response.js of the component HTTP Header Handler. The manipulation of the argument Referrer leads to open redirect. It is possible to launch the attack remotely. The exploit has been disclosed to the public and may be used.

Weakness: CWE-601

Which versions are affected by CVE-2025-8129?

4 open source packages ship an affected version, including koa. It affects 1 product.

PackageAffectedFixed in
koa npmFrom 2.0.02.16.2
koa npmFrom 2.0.02.16.2
koa npmFrom 3.0.0-alpha.03.0.1
koa npmFrom 3.0.0-alpha.03.0.1

Products include Koajs Koa.

How do I fix CVE-2025-8129?

Upgrade koa to a fixed version for your release line: 2.16.2 or 3.0.1.

Is CVE-2025-8129 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-8129 exists.

Sources

Also known as CVE-2025-54420, GHSA-jgmv-j7ww-jx2x, ROOT-APP-NPM-CVE-2025-8129.

Is CVE-2025-8129 in your software?

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

Check your SBOMs for free