# CVE-2025-61984: Command injection in OpenSSH

> OpenSSH allows control characters in untrusted usernames, enabling code execution when ProxyCommand is used.

- **Severity:** Low 3.6 (`CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 6 Oct 2025
- **Updated:** 15 Oct 2026
- **Also known as:** ALPINE-CVE-2025-61984, AZL-68231, BELL-CVE-2025-61984, DEBIAN-CVE-2025-61984, ECHO-8420-5303-4f71, GHSA-hh67-847q-q3h9, JLSEC-2025-7, SUSE-SU-2025:4097-1, UBUNTU-CVE-2025-61984

## What is CVE-2025-61984?

CVE-2025-61984 is a low-severity command injection vulnerability in OpenBSD OpenSSH, published on 6 Oct 2025. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

ssh in OpenSSH before 10.1 allows control characters in usernames that originate from certain possibly untrusted sources, potentially leading to code execution when a ProxyCommand is used. The untrusted sources are the command line and %-sequence expansion of a configuration file. (A configuration file that provides a complete literal username is not categorized as an untrusted source.)

Weakness: CWE-159 (Improper Handling of Invalid Use of Special Elements)

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `openssh` | SUSE:Linux Enterprise Server 12 SP5-LTSS | All versions | 7.2p2-81.34.1 |
| `openssh-askpass-gnome` | SUSE:Linux Enterprise Server 12 SP5-LTSS | All versions | 7.2p2-81.34.1 |
| `openssh` | SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | All versions | 7.2p2-81.34.1 |
| `openssh-askpass-gnome` | SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | All versions | 7.2p2-81.34.1 |

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

Upgrade to a fixed version.

## Is CVE-2025-61984 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-61984 exists.

Public exploit code:

- PoC for OpenSSH ProxyCommand CVE-2025-61984 (github_poc): https://github.com/dgl/cve-2025-61984-poc
- PoC for CVE-2025-61984 (github_poc): https://github.com/flyskyfire/cve-2025-61984-poc

## Fix prompt for AI coding agents

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

What it is: CVE-2025-61984 is a low-severity command injection vulnerability in OpenBSD OpenSSH, published on 6 Oct 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-61984 exists.

Affected product: OpenBSD OpenSSH. No package-level version data is available, so check the vendor advisory linked from the reference page.

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

## Sources

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

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