Impact
The vulnerability arises from improper escaping of output in the cowlib function cow_link:link/1 (and its variant cow_link:do_link/1). These functions directly insert target URIs, rel values, and attribute keys into the serialized Link header without enforcing HTTP token grammar or escaping. By injecting a ’>’ byte into the target, a quotation mark or backslash into the rel, or whitespace, equals, or quotation mark characters into 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 an 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 through 2.19.x 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 moderate severity. The EPSS score is less than 1%, suggesting a low probability of exploitation. 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