# CVE-2017-6891: Memory corruption in GnuTLS libtasn1

> A stack-based buffer overflow in libtasn1 allows attackers to execute arbitrary code or cause denial of service via a crafted assignments file.

- **Severity:** High 8.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 22 May 2017
- **Updated:** 5 Aug 2024
- **Also known as:** ALPINE-CVE-2017-6891, DEBIAN-CVE-2017-6891, DLA-950-1, DSA-3861-1, GHSA-ch46-3x6h-7qrw, MGASA-2017-0159, UBUNTU-CVE-2017-6891, USN-3309-1

## What is CVE-2017-6891?

CVE-2017-6891 is a high-severity memory corruption vulnerability in Debian Debian Linux, published on 22 May 2017. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

Two errors in the "asn1_find_node()" function (lib/parser_aux.c) within GnuTLS libtasn1 version 4.10 can be exploited to cause a stacked-based buffer overflow by tricking a user into processing a specially crafted assignments file via the e.g. asn1Coding utility.

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

## Which versions are affected by CVE-2017-6891?

It affects 3 products.


Products: Apache Bookkeeper, Debian Debian Linux, Gnu Libtasn1.

## How do I fix CVE-2017-6891?

Upgrade to a fixed version.

## Is CVE-2017-6891 being exploited?

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

## Other vulnerabilities in Debian Debian Linux

- [CVE-2019-17571](https://insights.sbomify.com/CVE-2019-17571/): Deserialization of Untrusted Data in Log4j (critical 9.8)
- [CVE-2020-36230](https://insights.sbomify.com/CVE-2020-36230/): A flaw was discovered in OpenLDAP before 2.4.57 leading in an assertion failure in slapd in the X.509 DN parsing in decode.c ber_next_elemen (high 7.5)
- [CVE-2019-19906](https://insights.sbomify.com/CVE-2019-19906/): Memory corruption in n/a (high 7.5)
- [CVE-2020-23922](https://insights.sbomify.com/CVE-2020-23922/): Memory corruption in n/a (high 7.1)
- [CVE-2022-32531](https://insights.sbomify.com/CVE-2022-32531/): Apache BookKeeper: Java Client Uses Connection to Host that Failed Hostname Verification (medium 5.9)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2017-6891 and fix it if it is affected.

What it is: CVE-2017-6891 is a high-severity memory corruption vulnerability in Debian Debian Linux, published on 22 May 2017. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2017-6891 in the wild and no public exploit code.

Affected product: Debian Debian Linux. 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-2017-6891/ (Markdown: https://insights.sbomify.com/CVE-2017-6891/index.md)
```

## Sources

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

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