# CVE-2025-13151: CVE-2025-13151

> A stack-based buffer overflow in libtasn1 allows attackers to execute arbitrary code or cause denial of service via malformed ASN.1 data.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/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:** 7 Jan 2026
- **Updated:** 20 Jan 2026
- **Also known as:** ALPINE-CVE-2025-13151, ALSA-2026:28235, ALSA-2026:28253, ALSA-2026:36728, AZL-73664, AZL-74006, AZL-74046, AZL-74070, BELL-CVE-2025-13151, CLEANSTART-2026-CD76162, CLSA-2026-1776184861, CLSA-2026-1776328800, DEBIAN-CVE-2025-13151, ECHO-3bb0-6190-9618, GHSA-f433-vfwr-65r3, MGASA-2026-0007, MINI-grw5-9f78-8x2q, OESA-2026-1178, OESA-2026-1179, OESA-2026-1180, OESA-2026-1181, OESA-2026-1182, OESA-2026-1183, OESA-2026-1232, RHSA-2026:28235, RHSA-2026:28253, RHSA-2026:36728, RHSA-2026:7500, RLSA-2026:28235, RLSA-2026:28253, RLSA-2026:36728, ROOT-OS-ALPINE-319-CVE-2025-13151, ROOT-OS-DEBIAN-11-CVE-2025-13151, ROOT-OS-DEBIAN-12-CVE-2025-13151, SUSE-SU-2026:0118-1, SUSE-SU-2026:0224-1, SUSE-SU-2026:20051-1, SUSE-SU-2026:20355-1, SUSE-SU-2026:21001-1, SUSE-SU-2026:21142-1, openSUSE-SU-2026:10033-1, openSUSE-SU-2026:20470-1

## What is CVE-2025-13151?

CVE-2025-13151 is a high-severity memory corruption vulnerability in GnuTLS libtasn1, published on 7 Jan 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Stack-based buffer overflow in libtasn1 version: v4.20.0. The function fails to validate the size of input data resulting in a buffer overflow in asn1_expend_octet_string.

Weakness: CWE-787 (Out-of-bounds Write)

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

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `libtasn1` | AlmaLinux:10 | All versions | 4.20.0-5.el10_2 |
| `libtasn1-devel` | AlmaLinux:10 | All versions | 4.20.0-5.el10_2 |
| `libtasn1-tools` | AlmaLinux:10 | All versions | 4.20.0-5.el10_2 |
| `libtasn1` | AlmaLinux:8 | All versions | 4.13-6.el8_10 |
| `libtasn1-devel` | AlmaLinux:8 | All versions | 4.13-6.el8_10 |
| `libtasn1-tools` | AlmaLinux:8 | All versions | 4.13-6.el8_10 |
| `libtasn1` | AlmaLinux:9 | All versions | 4.16.0-10.el9_8 |
| `libtasn1-devel` | AlmaLinux:9 | All versions | 4.16.0-10.el9_8 |
| `libtasn1-tools` | AlmaLinux:9 | All versions | 4.16.0-10.el9_8 |
| `libtasn1` | Red Hat:enterprise_linux:10.2 | All versions | 0:4.20.0-5.el10_2 |
| `libtasn1-debuginfo` | Red Hat:enterprise_linux:10.2 | All versions | 0:4.20.0-5.el10_2 |
| `libtasn1-debugsource` | Red Hat:enterprise_linux:10.2 | All versions | 0:4.20.0-5.el10_2 |
| `libtasn1-devel` | Red Hat:enterprise_linux:10.2 | All versions | 0:4.20.0-5.el10_2 |
| `libtasn1-tools` | Red Hat:enterprise_linux:10.2 | All versions | 0:4.20.0-5.el10_2 |
| `libtasn1-tools-debuginfo` | Red Hat:enterprise_linux:10.2 | All versions | 0:4.20.0-5.el10_2 |
| `libtasn1-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:4.13-6.el8_10 |
| `libtasn1-debugsource` | Red Hat:enterprise_linux:8::appstream | All versions | 0:4.13-6.el8_10 |
| `libtasn1-devel` | Red Hat:enterprise_linux:8::appstream | All versions | 0:4.13-6.el8_10 |
| `libtasn1-tools` | Red Hat:enterprise_linux:8::appstream | All versions | 0:4.13-6.el8_10 |
| `libtasn1-tools-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:4.13-6.el8_10 |
| `libtasn1` | Red Hat:enterprise_linux:8::baseos | All versions | 0:4.13-6.el8_10 |
| `libtasn1-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:4.13-6.el8_10 |
| `libtasn1-debugsource` | Red Hat:enterprise_linux:8::baseos | All versions | 0:4.13-6.el8_10 |
| `libtasn1-tools-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:4.13-6.el8_10 |
| `libtasn1-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:4.16.0-10.el9_8 |
| `libtasn1-debugsource` | Red Hat:enterprise_linux:9::appstream | All versions | 0:4.16.0-10.el9_8 |
| `libtasn1-devel` | Red Hat:enterprise_linux:9::appstream | All versions | 0:4.16.0-10.el9_8 |
| `libtasn1-tools` | Red Hat:enterprise_linux:9::appstream | All versions | 0:4.16.0-10.el9_8 |
| `libtasn1-tools-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:4.16.0-10.el9_8 |
| `libtasn1` | Red Hat:enterprise_linux:9::baseos | All versions | 0:4.16.0-10.el9_8 |
| `libtasn1-debuginfo` | Red Hat:enterprise_linux:9::baseos | All versions | 0:4.16.0-10.el9_8 |
| `libtasn1-debugsource` | Red Hat:enterprise_linux:9::baseos | All versions | 0:4.16.0-10.el9_8 |
| `libtasn1-tools-debuginfo` | Red Hat:enterprise_linux:9::baseos | All versions | 0:4.16.0-10.el9_8 |
| `libtasn1` | Red Hat:hummingbird:1 | All versions | 0:4.21.0-1.1.hum1 |
| `libtasn1-devel` | Red Hat:hummingbird:1 | All versions | 0:4.21.0-1.1.hum1 |
| `libtasn1-tools` | Red Hat:hummingbird:1 | All versions | 0:4.21.0-1.1.hum1 |
| `libtasn1` | Rocky Linux:10 | All versions | 0:4.20.0-5.el10_2 |
| `libtasn1` | Rocky Linux:8 | All versions | 0:4.13-6.el8_10 |
| `libtasn1` | Rocky Linux:9 | All versions | 0:4.16.0-10.el9_8 |
| `libtasn1` | SUSE:Linux Enterprise Micro 5.2 | All versions | 4.13-150000.4.14.1 |

Products: Gnu Libtasn1.

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

Apply the vendor's patch.

## Is CVE-2025-13151 being exploited?

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

## Other vulnerabilities in GnuTLS libtasn1

- [CVE-2017-10790](https://insights.sbomify.com/CVE-2017-10790/): Null dereference in n/a (high 7.5)
- [CVE-2018-1000654](https://insights.sbomify.com/CVE-2018-1000654/): Denial of service in n/a (medium 5.5)

## Fix prompt for AI coding agents

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

What it is: CVE-2025-13151 is a high-severity memory corruption vulnerability in GnuTLS libtasn1, published on 7 Jan 2026. 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-13151 in the wild and no public exploit code.

Affected product: GnuTLS libtasn1. 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-13151/ (Markdown: https://insights.sbomify.com/CVE-2025-13151/index.md)
```

## Sources

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

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