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

MODERATE
Advisory Identifier: GHSA-7g2v-jj9q-g3rg
CVSS 6.5
CWE-117 CWE-93
Published
Advisory Summary

CVE-2025-25184 is a MODERATE (CVSS 6.5) :commonlogger vulnerability (CWE-117: Improper Output Neutralization for Logs) affecting Possible Log Injection in Rack libraries in the RubyGems ecosystem. The issue involves :commonlogger. Remediation is available by upgrading affected packages to version 2.2.11, 3.0.12, 3.1.10.

CVE-2025-25184 at a Glance

CVE Identifier CVE-2025-25184
GHSA Identifier GHSA-7g2v-jj9q-g3rg
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-117: Improper Output Neutralization for Logs
Affected Product Possible Log Injection in Rack
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2025-25184

To remediate this vulnerability, upgrade all affected Possible Log Injection in Rack dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

rack fixed: 2.2.11
Upgrade rack to 2.2.11
rack fixed: 3.0.12
Upgrade rack to 3.0.12
rack fixed: 3.1.10
Upgrade rack to 3.1.10
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for rack

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-25184, inspect your project dependencies for Possible Log Injection in Rack:

inspect dependencies for rack

Analyze the terminal output to locate any version of Possible Log Injection in Rack in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.2.11), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-117: Improper Output Neutralization for Logs, where 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. In Possible Log Injection in Rack, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary `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. ## Details 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. ## Impact Attackers can break log formats or insert fraudulent entries, potentially obscuring real activity or injecting malicious data into log files. ## Mitigation - Update to the latest version of Rack.

CVE-2025-25184 Affected Possible Log Injection in Rack Versions

3 component(s)
Fixed Versions:
2.2.113.0.123.1.10
Product / Package Ecosystem Affected Versions Fixed Version
rack
RubyGems
< 2.2.11
2.2.11
rack
RubyGems
≥ 3.0
< 3.0.12
3.0.12
rack
RubyGems
≥ 3.1
< 3.1.10
3.1.10

References

Frequently Asked Questions

What is CVE-2025-25184?
CVE-2025-25184 is a security vulnerability in Possible Log Injection in Rack involving :CommonLogger under CWE-117: Improper Output Neutralization for Logs.
Which Possible Log Injection in Rack versions are affected?
Affected versions include releases prior to 2.2.11, 3.0.12, 3.1.10 across affected packages: rack.
What version fixes CVE-2025-25184?
Upgrading to 2.2.11, 3.0.12, 3.1.10 (or the latest patched release for your respective branch) resolves the vulnerability.
Is rack affected?
Yes, rack is affected in releases prior to 2.2.11, 3.0.12, 3.1.10. Upgrade your dependency to 2.2.11, 3.0.12, 3.1.10 or later.
What is the CVSS score of CVE-2025-25184?
CVE-2025-25184 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2025-25184?
CVE-2025-25184 is classified under 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.).
How can I check RubyGems dependencies for CVE-2025-25184?
Run the dependency tree command: 'inspect dependencies for rack'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7g2v-jj9q-g3rg",
  "modified" : "2025-11-04T00:32:20Z",
  "published" : "2025-02-12T19:18:35Z",
  "aliases" : [ "CVE-2025-25184" ],
  "summary" : "Possible Log Injection in Rack::CommonLogger",
  "details" : "## Summary\n\n`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.\n\n## Details\n\nWhen 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.\n\nThe 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.\n\n## Impact\n\nAttackers can break log formats or insert fraudulent entries, potentially obscuring real activity or injecting malicious data into log files.\n\n## Mitigation\n\n- Update to the latest version of Rack.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "rack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.2.11"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "rack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0"
      }, {
        "fixed" : "3.0.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "rack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.1"
      }, {
        "fixed" : "3.1.10"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/rack/rack/security/advisories/GHSA-7g2v-jj9q-g3rg"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-25184"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rack/rack/commit/074ae244430cda05c27ca91cda699709cfb3ad8e"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/rack/rack"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/CVE-2025-25184.yml"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2025/03/msg00016.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-117", "CWE-93" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-02-12T19:18:35Z",
    "nvd_published_at" : "2025-02-12T17:15:24Z"
  }
}