# CVE-2026-43971: Link Header Directive Smuggling via Unescaped target/rel/Attribute Keys in cow_link:link/1

> Attackers can smuggle Link header directives to force victim browsers to connect to attacker-controlled origins via unescaped characters in cowlib.

- **Severity:** Medium 6.3 (`CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 18 Aug 2026
- **Updated:** 16 Sep 2026
- **Also known as:** AZL-96873, DEBIAN-CVE-2026-43971, EEF-CVE-2026-43971, GHSA-gg23-fwhr-prjh, RHSA-2026:66210, UBUNTU-CVE-2026-43971

## What is CVE-2026-43971?

CVE-2026-43971 is a medium-severity vulnerability in ninenines cowlib, published on 18 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Improper Encoding or Escaping of Output vulnerability in ninenines cowlib allows Link header directive smuggling via unescaped special characters in cow_link:link/1.

cow_link:do_link/1 in cowlib interpolates the target URI, rel value, and attribute keys directly into the serialized Link: header value without escaping or token-grammar validation. A > byte in target prematurely closes the URI slot, allowing an attacker to append additional link entries with attacker-chosen rel directives. A " or \ in rel escapes the quoted string and opens new parameters. Any byte — including whitespace, =, and " — in an attribute key is emitted verbatim. Because browsers act on Link: directives such as rel="preconnect", rel="preload", and rel="prerender", an attacker who can influence these fields in an application that round-trips parsed Link headers through cow_link:link/1 can force victim browsers to make out-of-band connections to attacker-controlled origins.

This issue affects cowlib: from 2.9.0 before 2.20.0.

Weakness: CWE-116 (Improper Encoding or Escaping of Output)

## Which versions are affected by CVE-2026-43971?

1 open source package ship an affected version, including cowlib.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `cowlib` | Hex | From 2.9.0 | 2.20.0 |
| `rabbitmq-server4.3` | Red Hat:hummingbird:1 | All versions | 0:4.3.5-1.1.hum1 |

## How do I fix CVE-2026-43971?

Upgrade cowlib to 2.20.0 or later.

## Is CVE-2026-43971 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-43971 and fix it if it is affected.

What it is: CVE-2026-43971 is a medium-severity vulnerability in ninenines cowlib, published on 18 Aug 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-2026-43971 in the wild and no public exploit code.

Affected packages and fixed versions:
- cowlib (Hex): affected from 2.9.0; fixed in 2.20.0

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

## Sources

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

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