CVE-2024-42370 Litestar repository vulnerable to Environment Variable injection in `docs-preview.yml` workflow

High 8.3 Published Updated

Attackers can inject environment variables in the docs-preview workflow to exfiltrate secrets and manipulate repository content.

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
None listed

What is CVE-2024-42370?

CVE-2024-42370 is a high-severity code injection vulnerability in litestar-org litestar, published on 9 Aug 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

Litestar is an Asynchronous Server Gateway Interface (ASGI) framework. In versions 2.10.0 and prior, Litestar's `docs-preview.yml` workflow is vulnerable to Environment Variable injection which may lead to secret exfiltration and repository manipulation. This issue grants a malicious actor the permission to write issues, read metadata, and write pull requests. In addition, the `DOCS_PREVIEW_DEPLOY_TOKEN` is exposed to the attacker. Commit 84d351e96aaa2a1338006d6e7221eded161f517b contains a fix for this issue.

Weakness: CWE-78

Which versions are affected by CVE-2024-42370?

2 open source packages ship an affected version, including litestar.

PackageAffectedFixed in
litestar PyPIAll versions to 2.10.0None
litestar PyPIAll versions to 2.10.0None

How do I fix CVE-2024-42370?

No fix has been published for CVE-2024-42370 yet. Limit exposure of the affected software until one is available.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2024-42370 being exploited?

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

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as GHSA-4hq2-rpgc-r8r7.

Is CVE-2024-42370 in your software?

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

Check your SBOMs for free