🛡️ GHSA-674p-xv2x-rf3g — litestar

🟢 CVSS 2.0 — Low ✅ No Known Exploit CWE-117 OSV
2.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Litestar has potential log injection in exception logging

Summary

Litestar does not escape url paths when logging exceptions. This makes logger vulnerable to CRLF injection if logging level is configured to debug or log_exceptions is set to "always", which allows attackers to inject newlines and forge log entries.

Details

Litestar directly formats unquoted path into exception logs without validation or escaping when using default exception logging handler.

https://github.com/litestar-org/litestar/blob/1e0dc7c4d67151c836208a3e360051e983b5083a/litestar/logging/config.py#L145-L150

Attackers can inject newlines in logs by embedding%0d%0a in url path.

log_exceptions="always" is not enabled by default. However, it is set in the examples of documentation (https://github.com/litestar-org/litestar/blob/1e0dc7c4d67151c836208a3e360051e983b5083a/docs/usage/logging.rst#logging). User will be impacted if they directly copy the logging config from docs.

PoC

```

curl "http://172.17.0.2:8000/%29%0D%0AINFO:%20%20%20%20%20127.0.0.1:8192%20-%20%22POST%20/login%20HTTP/1.1%22%20200%20OK%0D%0A%28"

```

logging:

```

2025-07-15 00:00:00 - litestar - ERROR - Uncaught exception (connection_type=http, path=/)

INFO: 127.0.0.1:8192 - "POST /login HTTP/1.1" 200 OK

...

```

If stacktracks for 404 are configured to be ignored (disable_stack_trace={404},), attacker may also exploit this by sending malformed requests to cause 400/500 exceptions and avoid 404 in endpoints with str path parameters.

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is high, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity low, availability none.

Weakness class

GHSA-674p-xv2x-rf3g is classified as CWE-117: Improper Output Neutralization for Logs. The product constructs a log message from external input, but it does not neutralize or incorrectly neutralizes special elements when the message is written to a log file.

Affected software

GHSA-674p-xv2x-rf3g is recorded against 1 package.

  • litestar (fixed in 2.17.0)

Timeline and source

Published on 11 August 2025 and last revised on 12 August 2025. No public exploit is currently recorded for this entry. Record sourced from OSV.

References

github.com (Web)
github.com (Web)
github.com (Package)

Details

Severity LOW
CVSS Score 2.0
CVSS Vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
CWE CWE-117
Public Exploit ✅ No
Source OSV
Published 2025-08-11
Updated 2026-08-12
Modified 2025-08-12
Fix URL N/A

Affected Packages

Software From version Fixed in
litestar 2.17.0

Similar Threats

Free Vulnerability Check

Is your site affected by GHSA-674p-xv2x-rf3g?

BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against GHSA-674p-xv2x-rf3g and other known CVE records.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesGitHub AdvisoryGitHub Advisory Undated