Cloudanix VulnDB

CVE-2025-25184

None

Possible Log Injection in Rack::CommonLogger

CVSS

—

EPSS

1.2%

Published

Feb 12, 2025

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in a common web logging component can let someone forge or tamper with log entries, making investigations and monitoring less reliable.

Chainable
Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Data Tampering
Component
Library
Class
Improper Input Validation
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Rack::CommonLogger does not adequately neutralize newline characters in attacker-controlled request data before writing access log entries. A remote client can place CR/LF characters, often URL-encoded as %0d and %0a, in logged request components such as the path, query string, or selected headers, causing one HTTP request to be recorded as multiple log lines or to contain forged fields. The primary impact is log integrity compromise: attackers can fabricate misleading entries, obscure the true request, disrupt log parsers, or influence alerting and forensic interpretation. This is not a direct code execution or privilege escalation issue by itself.

Why it matters to the business

Organizations using affected Rack-based Ruby applications may lose confidence in access logs used for monitoring, incident response, fraud investigation, audit evidence, and compliance reporting. An attacker could make malicious traffic appear benign, create false evidence of activity, or pollute dashboards and SIEM rules that rely on line-oriented logs. The vulnerability is not listed in CISA KEV, is not known to be used in ransomware campaigns, has low EPSS, and has no reported mature exploitation in the provided data, so urgency is generally moderate; however, internet-facing applications and environments with strict audit requirements should remediate promptly because the affected component is commonly embedded in web application stacks.

How an attack unfolds

An attacker identifies a Rack-based web application that uses Rack::CommonLogger or a framework configuration that relies on it for access logging. The attacker sends a crafted HTTP request containing newline characters in data that will be written to the access log, such as a URL path, query string, or header value. If the application stack accepts the characters and the vulnerable logger writes them without escaping, the resulting access log contains attacker-controlled line breaks. The attacker can then append text that resembles legitimate access log entries, status codes, source addresses, paths, or timestamps. This can be used to hide the original malicious request among forged benign entries, create false positives to distract defenders, or poison downstream log processing systems that assume one request equals one log line.

How to fix it

Upgrade Rack to a release or source revision that contains the upstream fix. For rack/rack from Git, ensure the deployed code includes commit aa5a0f532aac7a57e4bc7e857eca1c38229f7b30 or a later trusted revision. Rebuild and redeploy applications that vendor Rack or pin dependencies in lockfiles. Where immediate upgrade is not possible, add compensating controls: reject or normalize CR and LF characters in request targets and relevant headers at the reverse proxy, load balancer, WAF, or application middleware; encode control characters before logging; use structured logging formats that safely escape strings; and ensure downstream log pipelines do not treat untrusted embedded line breaks as separate trusted events.

How to confirm the fix worked

Confirm the installed Rack dependency resolves to a version or commit containing aa5a0f532aac7a57e4bc7e857eca1c38229f7b30 or later. Review dependency lockfiles, container images, vendored gems, and runtime package inventories because Rack is often pulled in transitively by Ruby web frameworks. Perform a controlled regression test in a non-production environment by sending requests containing %0a and %0d%0a in the URL and commonly logged headers, then verify the resulting access log remains a single well-formed record with newline characters escaped, removed, or otherwise safely represented. Also validate that SIEM parsers, log shippers, and dashboards do not create extra trusted events from injected content.

Typical attack path

  1. Find a Ruby/Rack application or service that exposes HTTP endpoints and uses Rack::CommonLogger for request logging.
  2. Send test requests containing URL-encoded newline characters such as %0a or %0d%0a in the path, query string, or logged headers.
  3. Confirm that the application accepts the request and that log output is split across multiple lines or contains attacker-controlled forged content.
  4. Craft a malicious request where the injected second line mimics a valid access log entry, audit event, or benign request.
  5. Use the forged log content to obscure probing, mislead incident responders, pollute analytics, or interfere with SIEM detections that parse line-oriented logs.

How to detect it

To determine whether exploitation was attempted or successful, search raw HTTP access logs from Rack applications, upstream reverse proxies, load balancers, CDN/WAF logs, application logs, and centralized SIEM indexes for requests containing raw or URL-encoded carriage return and newline characters. Pay special attention to paths, query strings, User-Agent, Referer, X-Forwarded-For, Forwarded, and other headers that may be logged. Look for access log records that span multiple physical lines for a single request, log entries with malformed timestamps, impossible source addresses, duplicated request fragments, unexpected status-code fields, or lines that resemble valid access log entries but lack corresponding events in upstream proxy/CDN logs. Compare Rack application logs with upstream network logs for the same time window; forged entries should not have matching upstream request identifiers, source metadata, or byte counts. If log shippers support multiline handling, inspect ingestion errors, parser failures, sudden spikes in malformed records, and suspicious increases in events containing control characters. Because exploitation content is attacker-controlled, there is no single definitive IOC; detection should combine encoded newline searches with validation of log-line consistency across independent telemetry sources.

  • %0a
  • %0A
  • %0d
  • %0D
  • %0d%0a
  • %0D%0A
  • %250a
  • %250A
  • %250d
  • %250D
  • GET /%0a
  • GET /%0A
  • GET /%0d%0a
  • GET /%0D%0A
  • POST /%0a
  • POST /%0A
  • POST /%0d%0a
  • POST /%0D%0A
  • User-Agent: %0a
  • User-Agent: %0A
  • User-Agent: %0d%0a
  • Referer: %0a
  • Referer: %0A
  • Referer: %0d%0a
  • X-Forwarded-For: %0a
  • X-Forwarded-For: %0A
  • X-Forwarded-For: %0d%0a
  • Forwarded: %0a
  • Forwarded: %0A
  • Forwarded: %0d%0a
  • \r\n
  • \x0d\x0a

What your security team should do

  • Inventory Ruby/Rack applications and identify deployments using Rack::CommonLogger directly or through framework defaults.
  • Prioritize remediation for internet-facing applications, high-volume APIs, and systems where access logs are used for compliance, billing, abuse detection, or incident response.
  • Upgrade Rack to a fixed release or to a revision including commit aa5a0f532aac7a57e4bc7e857eca1c38229f7b30, then rebuild application images and redeploy.
  • Add WAF, reverse proxy, or middleware rules to block or sanitize CR/LF characters in request paths, query strings, and headers where compatible with application behavior.
  • Run targeted log searches for encoded or raw newline injection attempts, especially around suspicious authentication, administration, file upload, API, or error-generating requests.
  • Review SIEM correlation rules that rely on Rack access logs and harden parsers against multiline log injection.
  • Treat suspicious historical log entries around exploitation attempts as potentially untrustworthy and corroborate with reverse proxy, CDN, WAF, EDR, and application telemetry.

The record

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

Affected packages

Ecosystem Package Introduced Fixed
RubyGems rack 0 2.2.11
RubyGems rack 3.0 3.0.12
RubyGems rack 3.1 3.1.10
Chainguard gitaly-config-17.6 0 17.6.5-r0
Chainguard gitaly-config-17.7 0 17.7.4-r0
Chainguard gitaly-config-17.8 0 17.8.2-r0
Chainguard gitlab-base-17.6 0 17.6.5-r0
Chainguard gitlab-base-17.7 0 17.7.4-r0
Chainguard gitlab-base-17.8 0 17.8.2-r0
Chainguard gitlab-certificates-17.6 0 17.6.5-r0
Chainguard gitlab-certificates-17.7 0 17.7.4-r0
Chainguard gitlab-certificates-17.8 0 17.8.2-r0
Chainguard gitlab-cfssl-self-sign-scripts-17.6 0 17.6.5-r0
Chainguard gitlab-cfssl-self-sign-scripts-17.7 0 17.7.4-r0
Chainguard gitlab-cfssl-self-sign-scripts-17.8 0 17.8.2-r0
Chainguard gitlab-cng-17.6 0 17.6.5-r0
Chainguard gitlab-cng-17.7 0 17.7.4-r0
Chainguard gitlab-cng-17.8 0 17.8.2-r0
Chainguard gitlab-container-registry-17.6 0 17.6.5-r0
Chainguard gitlab-container-registry-17.7 0 17.7.4-r0
Chainguard gitlab-container-registry-17.8 0 17.8.2-r0
Chainguard gitlab-container-registry-compat-17.6 0 17.6.5-r0
Chainguard gitlab-container-registry-compat-17.7 0 17.7.4-r0
Chainguard gitlab-container-registry-compat-17.8 0 17.8.2-r0
Chainguard gitlab-container-registry-scripts-17.6 0 17.6.5-r0
Chainguard gitlab-container-registry-scripts-17.7 0 17.7.4-r0
Chainguard gitlab-container-registry-scripts-17.8 0 17.8.2-r0
Chainguard gitlab-elasticsearch-indexer-17.6 0 17.6.5-r0
Chainguard gitlab-elasticsearch-indexer-17.7 0 17.7.4-r0
Chainguard gitlab-elasticsearch-indexer-17.8 0 17.8.2-r0
Chainguard gitlab-elasticsearch-indexer-compat-17.6 0 17.6.5-r0
Chainguard gitlab-elasticsearch-indexer-compat-17.7 0 17.7.4-r0
Chainguard gitlab-elasticsearch-indexer-compat-17.8 0 17.8.2-r0
Chainguard gitlab-exporter-17.6 0 17.6.5-r0
Chainguard gitlab-exporter-17.7 0 17.7.4-r0
Chainguard gitlab-exporter-17.8 0 17.8.2-r0
Chainguard gitlab-exporter-scripts-17.6 0 17.6.5-r0
Chainguard gitlab-exporter-scripts-17.7 0 17.7.4-r0
Chainguard gitlab-exporter-scripts-17.8 0 17.8.2-r0
Chainguard gitlab-geo-logcursor-scripts-17.6 0 17.6.5-r0
Chainguard gitlab-geo-logcursor-scripts-17.7 0 17.7.4-r0
Chainguard gitlab-geo-logcursor-scripts-17.8 0 17.8.2-r0
Chainguard gitlab-gitaly-scripts-17.6 0 17.6.5-r0
Chainguard gitlab-gitaly-scripts-17.7 0 17.7.4-r0
Chainguard gitlab-gitaly-scripts-17.8 0 17.8.2-r0
Chainguard gitlab-logger-17.6 0 17.6.5-r0
Chainguard gitlab-logger-17.7 0 17.7.4-r0
Chainguard gitlab-logger-17.8 0 17.8.2-r0
Chainguard gitlab-logger-compat-17.6 0 17.6.5-r0
Chainguard gitlab-logger-compat-17.7 0 17.7.4-r0
Chainguard gitlab-logger-compat-17.8 0 17.8.2-r0
Chainguard gitlab-mailroom-17.6 0 17.6.5-r0
Chainguard gitlab-mailroom-17.7 0 17.7.4-r0
Chainguard gitlab-mailroom-17.8 0 17.8.2-r0
Chainguard gitlab-mailroom-scripts-17.6 0 17.6.5-r0
Chainguard gitlab-mailroom-scripts-17.7 0 17.7.4-r0
Chainguard gitlab-mailroom-scripts-17.8 0 17.8.2-r0
Chainguard gitlab-pages-scripts-17.6 0 17.6.5-r0
Chainguard gitlab-pages-scripts-17.7 0 17.7.4-r0
Chainguard gitlab-pages-scripts-17.8 0 17.8.2-r0
Chainguard gitlab-rails-ee-assets-fips-17.8 0 17.8.2-r0
Chainguard gitlab-rails-ee-doc-fips-17.8 0 17.8.2-r0
Chainguard gitlab-rails-ee-fips-17.8 0 17.8.2-r0
Chainguard gitlab-rails-scripts-17.6 0 17.6.5-r0
Chainguard gitlab-rails-scripts-17.7 0 17.7.4-r0
Chainguard gitlab-rails-scripts-17.8 0 17.8.2-r0
Chainguard gitlab-shell-17.6 0 17.6.5-r0
Chainguard gitlab-shell-17.7 0 17.7.4-r0
Chainguard gitlab-shell-17.8 0 17.8.2-r0
Chainguard gitlab-shell-scripts-17.6 0 17.6.5-r0
Chainguard gitlab-shell-scripts-17.7 0 17.7.4-r0
Chainguard gitlab-shell-scripts-17.8 0 17.8.2-r0
Chainguard gitlab-shell-scripts-compat-17.6 0 17.6.5-r0
Chainguard gitlab-shell-scripts-compat-17.7 0 17.7.4-r0
Chainguard gitlab-shell-scripts-compat-17.8 0 17.8.2-r0
Chainguard gitlab-sidekiq-scripts-17.6 0 17.6.5-r0
Chainguard gitlab-sidekiq-scripts-17.7 0 17.7.4-r0
Chainguard gitlab-sidekiq-scripts-17.8 0 17.8.2-r0
Chainguard gitlab-toolbox-scripts-17.6 0 17.6.5-r0
Chainguard gitlab-toolbox-scripts-17.7 0 17.7.4-r0
Chainguard gitlab-toolbox-scripts-17.8 0 17.8.2-r0
Chainguard gitlab-webservice-config-17.6 0 17.6.5-r0
Chainguard gitlab-webservice-config-17.7 0 17.7.4-r0
Chainguard gitlab-webservice-config-17.8 0 17.8.2-r0
Chainguard gitlab-webservice-scripts-17.6 0 17.6.5-r0
Chainguard gitlab-webservice-scripts-17.7 0 17.7.4-r0
Chainguard gitlab-webservice-scripts-17.8 0 17.8.2-r0
Chainguard gitlab-workhorse-scripts-17.6 0 17.6.5-r0
Chainguard gitlab-workhorse-scripts-17.7 0 17.7.4-r0
Chainguard gitlab-workhorse-scripts-17.8 0 17.8.2-r0
Chainguard kube-fluentd-operator 0 1.18.2-r23
Chainguard kube-fluentd-operator-compat 0 1.18.2-r23
Chainguard kube-fluentd-operator-default-config 0 1.18.2-r23
Chainguard kube-fluentd-operator-oci-entrypoint 0 1.18.2-r23
Chainguard logstash-8 0 8.17.2-r1
Chainguard logstash-8-bitnami-compat 0 8.17.2-r1
Chainguard logstash-8-compat 0 8.17.2-r1
Chainguard logstash-8-env2yaml 0 8.17.2-r1
Chainguard logstash-8-iamguarded-compat 0 8.17.2-r1
Chainguard logstash-8-with-output-opensearch 0 8.17.2-r1
Chainguard logstash-jre-bcfips 0 8.17.3-r0
Chainguard logstash-jre-bcfips-compat 0 8.17.3-r0
Chainguard logstash-jre-bcfips-env2yaml 0 8.17.3-r0
Chainguard logstash-jre-bcfips-with-output-opensearch 0 8.17.3-r0
Chainguard ruby3.2-rack 0 3.1.10-r0
Chainguard ruby3.2-rails-7.1 0 7.1.5.1-r2
Chainguard ruby3.2-rails-7.1-compat 0 7.1.5.1-r2
Chainguard ruby3.2-rails-7.2 0 7.2.2.1-r2
Chainguard ruby3.2-rails-7.2-compat 0 7.2.2.1-r2
Chainguard ruby3.2-rails-8.0 0 8.0.1-r2
Chainguard ruby3.2-rails-8.0-compat 0 8.0.1-r2
Chainguard ruby3.3-rack 0 3.1.10-r0
Chainguard ruby3.3-rack-2.2 0 2.2.22-r0
Chainguard ruby3.3-rails-7.1 0 7.1.5.1-r2
Chainguard ruby3.3-rails-7.1-compat 0 7.1.5.1-r2
Chainguard ruby3.3-rails-7.2 0 7.2.2.1-r2
Chainguard ruby3.3-rails-7.2-compat 0 7.2.2.1-r2
Chainguard ruby3.3-rails-8.0 0 8.0.1-r2
Chainguard ruby3.3-rails-8.0-compat 0 8.0.1-r2
Chainguard ruby3.4-rack 0 3.1.10-r0
Chainguard ruby3.4-rails-7.1 0 7.1.5.1-r2
Chainguard ruby3.4-rails-7.1-compat 0 7.1.5.1-r2
Chainguard ruby3.4-rails-7.2 0 7.2.2.1-r2
Chainguard ruby3.4-rails-7.2-compat 0 7.2.2.1-r2
Chainguard ruby3.4-rails-8.0 0 8.0.1-r2
Chainguard ruby3.4-rails-8.0-compat 0 8.0.1-r2
Debian:11 ruby-rack 0 No fix
Debian:11 ruby-rack 0 2.1.4-3+deb11u3
Debian:12 ruby-rack 0 No fix
Debian:12 ruby-rack 0 2.2.13-1~deb12u1
Debian:13 ruby-rack 0 No fix
Debian:13 ruby-rack 0 3.1.12-1
Mageia:9 ruby-rack 0 2.2.13-1.mga9
SUSE:Linux Enterprise High Availability Extension 15 SP3 rubygem-rack 0 2.0.8-150000.3.26.1
SUSE:Linux Enterprise High Availability Extension 15 SP4 rubygem-rack 0 2.0.8-150000.3.26.1
SUSE:Linux Enterprise High Availability Extension 15 SP5 rubygem-rack 0 2.0.8-150000.3.26.1
SUSE:Linux Enterprise High Availability Extension 15 SP6 rubygem-rack 0 2.0.8-150000.3.26.1
Wolfi gitaly-config-17.6 0 17.6.5-r0
Wolfi gitaly-config-17.7 0 17.7.4-r0
Wolfi gitaly-config-17.8 0 17.8.2-r0
Wolfi gitlab-base-17.6 0 17.6.5-r0
Wolfi gitlab-base-17.7 0 17.7.4-r0
Wolfi gitlab-base-17.8 0 17.8.2-r0
Wolfi gitlab-certificates-17.6 0 17.6.5-r0
Wolfi gitlab-certificates-17.7 0 17.7.4-r0
Wolfi gitlab-certificates-17.8 0 17.8.2-r0
Wolfi gitlab-cfssl-self-sign-scripts-17.6 0 17.6.5-r0
Wolfi gitlab-cfssl-self-sign-scripts-17.7 0 17.7.4-r0
Wolfi gitlab-cfssl-self-sign-scripts-17.8 0 17.8.2-r0
Wolfi gitlab-cng-17.6 0 17.6.5-r0
Wolfi gitlab-cng-17.7 0 17.7.4-r0
Wolfi gitlab-cng-17.8 0 17.8.2-r0
Wolfi gitlab-container-registry-17.6 0 17.6.5-r0
Wolfi gitlab-container-registry-17.7 0 17.7.4-r0
Wolfi gitlab-container-registry-17.8 0 17.8.2-r0
Wolfi gitlab-container-registry-compat-17.6 0 17.6.5-r0
Wolfi gitlab-container-registry-compat-17.7 0 17.7.4-r0
Wolfi gitlab-container-registry-compat-17.8 0 17.8.2-r0
Wolfi gitlab-container-registry-scripts-17.6 0 17.6.5-r0
Wolfi gitlab-container-registry-scripts-17.7 0 17.7.4-r0
Wolfi gitlab-container-registry-scripts-17.8 0 17.8.2-r0
Wolfi gitlab-elasticsearch-indexer-17.6 0 17.6.5-r0
Wolfi gitlab-elasticsearch-indexer-17.7 0 17.7.4-r0
Wolfi gitlab-elasticsearch-indexer-17.8 0 17.8.2-r0
Wolfi gitlab-elasticsearch-indexer-compat-17.6 0 17.6.5-r0
Wolfi gitlab-elasticsearch-indexer-compat-17.7 0 17.7.4-r0
Wolfi gitlab-elasticsearch-indexer-compat-17.8 0 17.8.2-r0
Wolfi gitlab-exporter-17.6 0 17.6.5-r0
Wolfi gitlab-exporter-17.7 0 17.7.4-r0
Wolfi gitlab-exporter-17.8 0 17.8.2-r0
Wolfi gitlab-exporter-scripts-17.6 0 17.6.5-r0
Wolfi gitlab-exporter-scripts-17.7 0 17.7.4-r0
Wolfi gitlab-exporter-scripts-17.8 0 17.8.2-r0
Wolfi gitlab-geo-logcursor-scripts-17.6 0 17.6.5-r0
Wolfi gitlab-geo-logcursor-scripts-17.7 0 17.7.4-r0
Wolfi gitlab-geo-logcursor-scripts-17.8 0 17.8.2-r0
Wolfi gitlab-gitaly-scripts-17.6 0 17.6.5-r0
Wolfi gitlab-gitaly-scripts-17.7 0 17.7.4-r0
Wolfi gitlab-gitaly-scripts-17.8 0 17.8.2-r0
Wolfi gitlab-logger-17.6 0 17.6.5-r0
Wolfi gitlab-logger-17.7 0 17.7.4-r0
Wolfi gitlab-logger-17.8 0 17.8.2-r0
Wolfi gitlab-logger-compat-17.6 0 17.6.5-r0
Wolfi gitlab-logger-compat-17.7 0 17.7.4-r0
Wolfi gitlab-logger-compat-17.8 0 17.8.2-r0
Wolfi gitlab-mailroom-17.6 0 17.6.5-r0
Wolfi gitlab-mailroom-17.7 0 17.7.4-r0
Wolfi gitlab-mailroom-17.8 0 17.8.2-r0
Wolfi gitlab-mailroom-scripts-17.6 0 17.6.5-r0
Wolfi gitlab-mailroom-scripts-17.7 0 17.7.4-r0
Wolfi gitlab-mailroom-scripts-17.8 0 17.8.2-r0
Wolfi gitlab-pages-scripts-17.6 0 17.6.5-r0
Wolfi gitlab-pages-scripts-17.7 0 17.7.4-r0
Wolfi gitlab-pages-scripts-17.8 0 17.8.2-r0
Wolfi gitlab-rails-scripts-17.6 0 17.6.5-r0
Wolfi gitlab-rails-scripts-17.7 0 17.7.4-r0
Wolfi gitlab-rails-scripts-17.8 0 17.8.2-r0
Wolfi gitlab-shell-17.6 0 17.6.5-r0
Wolfi gitlab-shell-17.7 0 17.7.4-r0
Wolfi gitlab-shell-17.8 0 17.8.2-r0

Related vulnerabilities