# CVE-2025-55193: Active Record logging vulnerable to ANSI escape injection

> Attackers can inject ANSI escape sequences into Active Record logs via database IDs, potentially manipulating terminal output or hiding malicious activity.

- **Severity:** Low 2.7 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N/E:U`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 13 Aug 2025
- **Updated:** 14 Aug 2025
- **Also known as:** DEBIAN-CVE-2025-55193, GHSA-76r7-hhxj-r776, UBUNTU-CVE-2025-55193, openSUSE-SU-2025:15479-1

## What is CVE-2025-55193?

CVE-2025-55193 is a low-severity vulnerability in rails, published on 13 Aug 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Active Record connects classes to relational database tables. Prior to versions 7.1.5.2, 7.2.2.2, and 8.0.2.1, the ID passed to find or similar methods may be logged without escaping. If this is directly to the terminal it may include unescaped ANSI sequences. This issue has been patched in versions 7.1.5.2, 7.2.2.2, and 8.0.2.1.

Weakness: CWE-150 (Improper Neutralization of Escape, Meta, or Control Sequences)

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

6 open source packages ship an affected version, including activerecord.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `activerecord` | RubyGems | All versions | 7.1.5.2 |
| `activerecord` | RubyGems | All versions | 7.1.5.2 |
| `activerecord` | RubyGems | From 7.2 | 7.2.2.2 |
| `activerecord` | RubyGems | From 7.2 | 7.2.2.2 |
| `activerecord` | RubyGems | From 8.0 | 8.0.2.1 |
| `activerecord` | RubyGems | From 8.0 | 8.0.2.1 |
| `rubygem-activerecord-8.0` | openSUSE:Tumbleweed | All versions | 8.0.1-2.1 |

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

Upgrade activerecord to a fixed version for your release line: 7.1.5.2, 7.2.2.2 or 8.0.2.1.

## Is CVE-2025-55193 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2025-55193 is a low-severity vulnerability in rails, published on 13 Aug 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-55193 in the wild and no public exploit code.

Affected packages and fixed versions:
- activerecord (RubyGems): affected all versions; fixed in 7.1.5.2
- activerecord (RubyGems): affected all versions; fixed in 7.1.5.2
- activerecord (RubyGems): affected from 7.2; fixed in 7.2.2.2
- activerecord (RubyGems): affected from 7.2; fixed in 7.2.2.2
- activerecord (RubyGems): affected from 8.0; fixed in 8.0.2.1
- activerecord (RubyGems): affected from 8.0; fixed in 8.0.2.1

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-55193/ (Markdown: https://insights.sbomify.com/CVE-2025-55193/index.md)
```

## Sources

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

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