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

> Attackers can inject CRLF characters into log entries via crafted usernames, corrupting logs or hiding activity in Rack-based Ruby applications.

- **Severity:** Medium 5.7 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 12 Feb 2025
- **Updated:** 3 Nov 2025
- **Also known as:** DEBIAN-CVE-2025-25184, GHSA-7g2v-jj9q-g3rg, MINI-qwwh-jr8r-c36v, MINI-vmwh-xc8q-88cc, RHSA-2025:7085, UBUNTU-CVE-2025-25184

## What is CVE-2025-25184?

CVE-2025-25184 is a medium-severity vulnerability in rack, published on 12 Feb 2025. Any signed-in user can exploit it over the network, with no action from the victim.

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

Weakness: CWE-93 (Improper Neutralization of CRLF Sequences), CWE-117 (Improper Output Neutralization for Logs)

## Which versions are affected by CVE-2025-25184?

6 open source packages ship an affected version, including rack. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `rack` | RubyGems | All versions | 2.2.11 |
| `rack` | RubyGems | All versions | 2.2.11 |
| `rack` | RubyGems | From 3.0 | 3.0.12 |
| `rack` | RubyGems | From 3.0 | 3.0.12 |
| `rack` | RubyGems | From 3.1 | 3.1.10 |
| `rack` | RubyGems | From 3.1 | 3.1.10 |
| `pcs` | Red Hat:enterprise_linux:9::highavailability | All versions | 0:0.11.9-2.el9 |
| `pcs-snmp` | Red Hat:enterprise_linux:9::highavailability | All versions | 0:0.11.9-2.el9 |
| `pcs` | Red Hat:enterprise_linux:9::resilientstorage | All versions | 0:0.11.9-2.el9 |
| `pcs-snmp` | Red Hat:enterprise_linux:9::resilientstorage | All versions | 0:0.11.9-2.el9 |

Products: Rack Rack.

## How do I fix CVE-2025-25184?

Upgrade rack to a fixed version for your release line: 2.2.11, 3.0.12 or 3.1.10.

## Is CVE-2025-25184 being exploited?

There is no known exploitation of CVE-2025-25184 in the wild and no public exploit code.

## Other vulnerabilities in rack

- [CVE-2026-34785](https://insights.sbomify.com/CVE-2026-34785/): Rack: Local file inclusion in `Rack::Static` via URL Prefix Matching (high 7.5)
- [CVE-2026-34827](https://insights.sbomify.com/CVE-2026-34827/): Rack: Algorithmic-Complexity DoS in Rack::Multipart::Parser (high 7.5)
- [CVE-2026-34829](https://insights.sbomify.com/CVE-2026-34829/): Rack: Denial of Service via Unbounded Multipart File Upload Without Content-Length (high 7.5)
- [CVE-2026-22860](https://insights.sbomify.com/CVE-2026-22860/): Rack has a Directory Traversal via Rack:Directory (high 7.5)
- [CVE-2025-61919](https://insights.sbomify.com/CVE-2025-61919/): Rack is vulnerable to a memory-exhaustion DoS through unbounded URL-encoded body parsing (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-25184 and fix it if it is affected.

What it is: CVE-2025-25184 is a medium-severity vulnerability in rack, published on 12 Feb 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-25184 in the wild and no public exploit code.

Affected packages and fixed versions:
- rack (RubyGems): affected all versions; fixed in 2.2.11
- rack (RubyGems): affected all versions; fixed in 2.2.11
- rack (RubyGems): affected from 3.0; fixed in 3.0.12
- rack (RubyGems): affected from 3.0; fixed in 3.0.12
- rack (RubyGems): affected from 3.1; fixed in 3.1.10
- rack (RubyGems): affected from 3.1; fixed in 3.1.10

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-25184/ (Markdown: https://insights.sbomify.com/CVE-2025-25184/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-25184
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-25184
- OSV: https://osv.dev/vulnerability/CVE-2025-25184

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-25184/
Summaries are generated and may contain mistakes; the official description above is the record.
