Impact
The vulnerability arises from improper escaping of output in the cowlib function cow_link:link/1, which directly interpolates target URIs, rel values, and attribute keys into a serialized Link header without enforcing HTTP token grammar or escaping. By injecting a ‘>’ byte in the target, a quote or backslash in the rel, or whitespace, equal, or quote characters in an attribute key, an attacker can cause the Link header to contain additional, attacker‑chosen directives such as rel="preconnect", rel="preload", or rel="prerender". These directives cause browsers to make out‑of‑band connections to attacker‑controlled origins, potentially exfiltrating data or leaking credentials. The flaw is a classic example of CWE‑116 (Improper Encoding or Escaping of Output).
Affected Systems
The affected package is cowlib, maintained by ninenines. All releases from version 2.9.0 onward include the vulnerable implementation of cow_link:link/1. Applications that depend on these releases and use cow_link:link/1 to construct Link headers from any source that might be influenced by user input are directly affected.
Risk and Exploitability
The CVSS score is 6.3, indicating a moderate severity. No EPSS score is available and the vulnerability is not listed in CISA’s KEV catalog. Exploitation requires the attacker to influence the target, rel, or attribute key fields supplied to cow_link:link/1; this typically means the attacker must either supply crafted input to the application or compromise it in some way. Once the input reaches cow_link:link/1, the browser will follow the injected Link directives, enabling resource hijacking and potential credential leakage. The risk is still present even though no public exploits have been documented.
OpenCVE Enrichment