# CVE-2023-25136: Memory corruption in n/a

> Unauthenticated remote attackers can exploit a double-free in OpenSSH to potentially execute arbitrary code or crash the service.

- **Severity:** Medium 6.5 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 3 Feb 2023
- **Updated:** 14 Oct 2026
- **Also known as:** ALSA-2023:2645, BELL-CVE-2023-25136, DEBIAN-CVE-2023-25136, GHSA-w62j-g234-3f6f, JLSEC-2026-66, OESA-2023-1063, OESA-2023-1064, RHSA-2023:2645

## What is CVE-2023-25136?

CVE-2023-25136 is a medium-severity memory corruption vulnerability in Fedoraproject Fedora, published on 3 Feb 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

OpenSSH server (sshd) 9.1 introduced a double-free vulnerability during options.kex_algorithms handling. This is fixed in OpenSSH 9.2. The double free can be leveraged, by an unauthenticated remote attacker in the default configuration, to jump to any location in the sshd address space. One third-party report states "remote code execution is theoretically possible."

Weakness: CWE-415 (Double Free)

## Which versions are affected by CVE-2023-25136?

It affects 6 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `openssh` | AlmaLinux:9 | All versions | 8.7p1-29.el9_2 |
| `openssh-askpass` | AlmaLinux:9 | All versions | 8.7p1-29.el9_2 |
| `openssh-clients` | AlmaLinux:9 | All versions | 8.7p1-29.el9_2 |
| `openssh-keycat` | AlmaLinux:9 | All versions | 8.7p1-29.el9_2 |
| `openssh-server` | AlmaLinux:9 | All versions | 8.7p1-29.el9_2 |
| `pam_ssh_agent_auth` | AlmaLinux:9 | All versions | 0.10.4-5.29.el9_2 |
| `openssh-askpass` | Red Hat:enterprise_linux:9::appstream | All versions | 0:8.7p1-29.el9_2 |
| `openssh-askpass-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:8.7p1-29.el9_2 |
| `openssh-clients-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:8.7p1-29.el9_2 |
| `openssh-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:8.7p1-29.el9_2 |
| `openssh-debugsource` | Red Hat:enterprise_linux:9::appstream | All versions | 0:8.7p1-29.el9_2 |
| `openssh-keycat-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:8.7p1-29.el9_2 |
| `openssh-server-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:8.7p1-29.el9_2 |
| `openssh-sk-dummy-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:8.7p1-29.el9_2 |
| `pam_ssh_agent_auth` | Red Hat:enterprise_linux:9::appstream | All versions | 0:0.10.4-5.29.el9_2 |
| `pam_ssh_agent_auth-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:0.10.4-5.29.el9_2 |
| `openssh` | Red Hat:enterprise_linux:9::baseos | All versions | 0:8.7p1-29.el9_2 |
| `openssh-askpass-debuginfo` | Red Hat:enterprise_linux:9::baseos | All versions | 0:8.7p1-29.el9_2 |
| `openssh-clients` | Red Hat:enterprise_linux:9::baseos | All versions | 0:8.7p1-29.el9_2 |
| `openssh-clients-debuginfo` | Red Hat:enterprise_linux:9::baseos | All versions | 0:8.7p1-29.el9_2 |
| `openssh-debuginfo` | Red Hat:enterprise_linux:9::baseos | All versions | 0:8.7p1-29.el9_2 |
| `openssh-debugsource` | Red Hat:enterprise_linux:9::baseos | All versions | 0:8.7p1-29.el9_2 |
| `openssh-keycat` | Red Hat:enterprise_linux:9::baseos | All versions | 0:8.7p1-29.el9_2 |
| `openssh-keycat-debuginfo` | Red Hat:enterprise_linux:9::baseos | All versions | 0:8.7p1-29.el9_2 |
| `openssh-server` | Red Hat:enterprise_linux:9::baseos | All versions | 0:8.7p1-29.el9_2 |
| `openssh-server-debuginfo` | Red Hat:enterprise_linux:9::baseos | All versions | 0:8.7p1-29.el9_2 |
| `openssh-sk-dummy-debuginfo` | Red Hat:enterprise_linux:9::baseos | All versions | 0:8.7p1-29.el9_2 |
| `pam_ssh_agent_auth-debuginfo` | Red Hat:enterprise_linux:9::baseos | All versions | 0:0.10.4-5.29.el9_2 |

Products: Fedoraproject Fedora, Netapp 500f Firmware, Netapp A250 Firmware, Netapp C250 Firmware, Netapp Ontap Select Deploy Administration Utility, OpenSSH.

## How do I fix CVE-2023-25136?

Upgrade to a fixed version.

## Is CVE-2023-25136 being exploited?

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

Public exploit code:

- OpenSSH 9.1 vulnerability mass scan and exploit (github_poc): https://github.com/Christbowel/CVE-2023-25136
- OpenSSH Pre-Auth Double Free CVE-2023-25136 POC (github_poc): https://github.com/adhikara13/CVE-2023-25136
- https://github.com/jfrog/jfrog-CVE-2023-25136-OpenSSH_Double-Free (github_poc): https://github.com/jfrog/jfrog-CVE-2023-25136-OpenSSH_Double-Free
- OpenSSH 9.1 vulnerability mass scan and exploit (github_poc): https://github.com/nhakobyan685/CVE-2023-25136
- OpenSSH 9.1漏洞大规模扫描和利用 (github_poc): https://github.com/H4K6/CVE-2023-25136
- https://github.com/ticofookfook/CVE-2023-25136 (github_poc): https://github.com/ticofookfook/CVE-2023-25136

## Other vulnerabilities in Fedoraproject Fedora

- [CVE-2024-4577](https://insights.sbomify.com/CVE-2024-4577/): PHP-CGI OS Command Injection (critical 9.8, exploited in the wild)
- [CVE-2021-39226](https://insights.sbomify.com/CVE-2021-39226/): Grafana Authentication Bypass (critical 9.8, exploited in the wild)
- [CVE-2019-5544](https://insights.sbomify.com/CVE-2019-5544/): VMware ESXi and Horizon DaaS OpenSLP Heap-Based Buffer Overflow (critical 9.8, exploited in the wild)
- [CVE-2024-4947](https://insights.sbomify.com/CVE-2024-4947/): Google Chromium V8 Type Confusion (critical 9.6, exploited in the wild)
- [CVE-2024-4671](https://insights.sbomify.com/CVE-2024-4671/): Google Chromium Visuals Use-After-Free (critical 9.6, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-25136 and fix it if it is affected.

What it is: CVE-2023-25136 is a medium-severity memory corruption vulnerability in Fedoraproject Fedora, published on 3 Feb 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-25136 exists.

Affected product: Fedoraproject Fedora. 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-2023-25136/ (Markdown: https://insights.sbomify.com/CVE-2023-25136/index.md)
```

## Sources

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

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