{"id":"CVE-2026-43971","state":"PUBLISHED","title":"Link Header Directive Smuggling via Unescaped target/rel/Attribute Keys in cow_link:link/1","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.\n\ncow_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.\n\nThis issue affects cowlib: from 2.9.0 before 2.20.0.","publishedAt":"2026-08-18T09:01:53.199Z","updatedAt":"2026-09-16T20:24:09.279Z","severity":{"score":6.3,"label":"Medium","version":"4.0","vector":"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","source":"EEF"},"assigner":"EEF","products":["ninenines cowlib"],"affected":[{"vendor":"ninenines","product":"cowlib","packageName":"cowlib","packageURL":"pkg:hex/cowlib","defaultStatus":"unaffected","versions":[{"version":"2.9.0","status":"affected","lessThan":"2.20.0","versionType":"semver"}],"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:ninenines:cowlib:*:*:*:*:*:*:*:*"],"modules":["cow_link"],"programFiles":["src/cow_link.erl"],"programRoutines":[{"name":"cow_link:link/1"},{"name":"cow_link:do_link/1"},{"name":"cow_link:escape/2"}],"repo":"https://github.com/ninenines/cowlib"},{"vendor":"ninenines","product":"cowlib","packageName":"ninenines/cowlib","packageURL":"pkg:github/ninenines/cowlib","defaultStatus":"unaffected","versions":[{"version":"485d58dfa91b91d98135dc95e5615f421715dae5","status":"affected","lessThan":"89da27ee4c241f5d649ba7d9b7f2188918af6cea","versionType":"git"}],"collectionURL":"https://github.com","cpes":["cpe:2.3:a:ninenines:cowlib:*:*:*:*:*:*:*:*"],"modules":["cow_link"],"programFiles":["src/cow_link.erl"],"programRoutines":[{"name":"cow_link:link/1"},{"name":"cow_link:do_link/1"},{"name":"cow_link:escape/2"}],"repo":"https://github.com/ninenines/cowlib"}],"references":["https://cna.erlef.org/cves/CVE-2026-43971.html","https://osv.dev/vulnerability/EEF-CVE-2026-43971","https://github.com/ninenines/cowlib/commit/485d58dfa91b91d98135dc95e5615f421715dae5","https://github.com/ninenines/cowlib/commit/89da27ee4c241f5d649ba7d9b7f2188918af6cea"],"weaknesses":["CWE-116"],"ingestedAt":"2026-10-29T20:11:57.932Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/43xxx/CVE-2026-43971.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-43971","state":"PUBLISHED","datePublished":"2026-08-18T09:01:53.199Z","dateUpdated":"2026-09-16T20:24:09.279Z","assignerShortName":"EEF","assignerOrgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","dateReserved":"2026-05-04T18:23:25.574Z"},"containers":{"cna":{"title":"Link Header Directive Smuggling via Unescaped target/rel/Attribute Keys in cow_link:link/1","descriptions":[{"lang":"en","value":"Improper Encoding or Escaping of Output vulnerability in ninenines cowlib allows Link header directive smuggling via unescaped special characters in cow_link:link/1.\n\ncow_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.\n\nThis issue affects cowlib: from 2.9.0 before 2.20.0."}],"affected":[{"vendor":"ninenines","product":"cowlib","packageName":"cowlib","packageURL":"pkg:hex/cowlib","defaultStatus":"unaffected","versions":[{"version":"2.9.0","status":"affected","lessThan":"2.20.0","versionType":"semver"}],"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:ninenines:cowlib:*:*:*:*:*:*:*:*"],"modules":["cow_link"],"programFiles":["src/cow_link.erl"],"programRoutines":[{"name":"cow_link:link/1"},{"name":"cow_link:do_link/1"},{"name":"cow_link:escape/2"}],"repo":"https://github.com/ninenines/cowlib"},{"vendor":"ninenines","product":"cowlib","packageName":"ninenines/cowlib","packageURL":"pkg:github/ninenines/cowlib","defaultStatus":"unaffected","versions":[{"version":"485d58dfa91b91d98135dc95e5615f421715dae5","status":"affected","lessThan":"89da27ee4c241f5d649ba7d9b7f2188918af6cea","versionType":"git"}],"collectionURL":"https://github.com","cpes":["cpe:2.3:a:ninenines:cowlib:*:*:*:*:*:*:*:*"],"modules":["cow_link"],"programFiles":["src/cow_link.erl"],"programRoutines":[{"name":"cow_link:link/1"},{"name":"cow_link:do_link/1"},{"name":"cow_link:escape/2"}],"repo":"https://github.com/ninenines/cowlib"}],"references":[{"url":"https://cna.erlef.org/cves/CVE-2026-43971.html","name":"EEF CNA record for CVE-2026-43971","tags":["related","third-party-advisory"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-43971","name":"OSV record EEF-CVE-2026-43971","tags":["related"]},{"url":"https://github.com/ninenines/cowlib/commit/485d58dfa91b91d98135dc95e5615f421715dae5","name":"Introducing commit 485d58d in ninenines/cowlib","tags":["related"]},{"url":"https://github.com/ninenines/cowlib/commit/89da27ee4c241f5d649ba7d9b7f2188918af6cea","name":"Fix commit 89da27e in ninenines/cowlib","tags":["patch"]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"PRESENT","attackVector":"NETWORK","baseScore":6.3,"baseSeverity":"MEDIUM","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"LOW","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"LOW","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-116","description":"CWE-116 Improper Encoding or Escaping of Output","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"EEF","orgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","dateUpdated":"2026-09-16T20:24:09.279Z"},"configurations":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>The application must pass values that originate from, or can be influenced by, untrusted input into <code>cow_link:link/1</code> — specifically the target URI, rel value, or attribute keys. Applications that construct Link entries exclusively from trusted, application-controlled values are not affected.</p>"},{"base64":false,"type":"text/markdown","value":"The application must pass values that originate from, or can be influenced by, untrusted input into `cow_link:link/1` — specifically the target URI, rel value, or attribute keys. Applications that construct Link entries exclusively from trusted, application-controlled values are not affected."}],"value":"The application must pass values that originate from, or can be influenced by, untrusted input into cow_link:link/1 — specifically the target URI, rel value, or attribute keys. Applications that construct Link entries exclusively from trusted, application-controlled values are not affected."}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:ninenines:cowlib:*:*:*:*:*:*:*:*","versionEndExcluding":"2.20.0","versionStartIncluding":"2.9.0","vulnerable":true}],"negate":false,"operator":"OR"}],"operator":"AND"}],"credits":[{"lang":"en","type":"finder","value":"Peter Ullrich"},{"lang":"en","type":"remediation developer","value":"Jonatan Männchen / EEF"},{"lang":"en","type":"remediation reviewer","value":"Loïc Hoguin"}],"impacts":[{"capecId":"CAPEC-137","descriptions":[{"lang":"en","value":"CAPEC-137 Parameter Injection"}]}],"source":{"discovery":"EXTERNAL"},"workarounds":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Sanitize values before passing them to <code>cow_link:link/1</code>: reject or strip any target value containing <code>&gt;</code>, any rel value containing <code>\"</code> or <code>\\</code>, and any attribute key containing characters outside the HTTP token grammar. Alternatively, ensure all Link entry fields are derived exclusively from trusted, application-controlled values rather than untrusted input.</p>"},{"base64":false,"type":"text/markdown","value":"Sanitize values before passing them to `cow_link:link/1`: reject or strip any target value containing `>`, any rel value containing `\"` or `\\`, and any attribute key containing characters outside the HTTP token grammar. Alternatively, ensure all Link entry fields are derived exclusively from trusted, application-controlled values rather than untrusted input."}],"value":"Sanitize values before passing them to cow_link:link/1: reject or strip any target value containing >, any rel value containing \" or \\, and any attribute key containing characters outside the HTTP token grammar. Alternatively, ensure all Link entry fields are derived exclusively from trusted, application-controlled values rather than untrusted input."}]},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-08-18T14:11:55.645955Z","id":"CVE-2026-43971","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-08-18T14:12:35.495Z"}}]}}}