CVE-2026-43971: CWE-116 Improper Encoding or Escaping of Output in ninenines cowlib
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.
AI Analysis
Technical Summary
The vulnerability in ninenines cowlib arises from cow_link:do_link/1 interpolating the target URI, rel value, and attribute keys directly into the serialized Link header without proper escaping or validation. Specifically, a '>' byte prematurely closes the URI slot, enabling injection of additional link entries with attacker-chosen rel directives. Similarly, '"' or '\' characters in the rel value can escape the quoted string and open new parameters. Attribute keys are emitted verbatim, including whitespace, '=', and '"'. Because browsers act on Link header directives like rel="preconnect", rel="preload", and rel="prerender", an attacker controlling these fields can force victim browsers to make out-of-band connections to malicious origins. This affects cowlib versions >=2.9.0 and <2.20.0.
Potential Impact
An attacker who can influence the Link header fields in an application using vulnerable cowlib versions can inject malicious Link directives. This can cause browsers to initiate unintended network connections to attacker-controlled servers, potentially leading to privacy violations or other side effects. The CVSS 4.0 score is 6.3 (medium severity), reflecting network attack vector, low complexity, partial attacker's privileges, no user interaction, and limited impact on integrity and availability.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, avoid round-tripping parsed Link headers through cow_link:link/1 with untrusted input or sanitize and validate all Link header components to prevent injection of special characters.
CVE-2026-43971: CWE-116 Improper Encoding or Escaping of Output in ninenines cowlib
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.
CVSS v4.0
Score 6.3medium
Affected software
ninenines
cowlib
ninenines
cowlib
cpe:2.3:a:ninenines:cowlib:*:*:*:*:*:*:*:*Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in ninenines cowlib arises from cow_link:do_link/1 interpolating the target URI, rel value, and attribute keys directly into the serialized Link header without proper escaping or validation. Specifically, a '>' byte prematurely closes the URI slot, enabling injection of additional link entries with attacker-chosen rel directives. Similarly, '"' or '\' characters in the rel value can escape the quoted string and open new parameters. Attribute keys are emitted verbatim, including whitespace, '=', and '"'. Because browsers act on Link header directives like rel="preconnect", rel="preload", and rel="prerender", an attacker controlling these fields can force victim browsers to make out-of-band connections to malicious origins. This affects cowlib versions >=2.9.0 and <2.20.0.
Potential Impact
An attacker who can influence the Link header fields in an application using vulnerable cowlib versions can inject malicious Link directives. This can cause browsers to initiate unintended network connections to attacker-controlled servers, potentially leading to privacy violations or other side effects. The CVSS 4.0 score is 6.3 (medium severity), reflecting network attack vector, low complexity, partial attacker's privileges, no user interaction, and limited impact on integrity and availability.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, avoid round-tripping parsed Link headers through cow_link:link/1 with untrusted input or sanitize and validate all Link header components to prevent injection of special characters.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- EEF
- Date Reserved
- 2026-05-04T18:23:25.574Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a8421d0bf8831d539835c23
Added to database: 08/18/2026, 09:11:44 UTC
Last enriched: 09/19/2026, 00:00:12 UTC
Last updated: 10/02/2026, 02:46:04 UTC
Views: 72
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.