CVE-2026-43971: cowlib Package Vulnerability - Link Header Directive Smuggling

cowlib Updated 18 Aug 2026

Summary

18/08/2026
No i
Medium
6.3

CVE-2026-43971: Link Header Directive Smuggling via Unescaped target/rel/Attribute Keys in cow_link:link/1. Affects cowlib across 2 version ranges.

>= 2.9.0 >= 485d58dfa91b91d98135dc95e5615f421715dae5, < 89da27ee4c241f5d649ba7d9b7f2188918af6cea

No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

cowlib is a library used in Erlang applications for handling HTTP link headers. It provides functionality for creating and parsing Link headers, which are crucial for optimizing web performance through preloading resources. However, versions from 2.9.0 onward are susceptible to a serious vulnerability that allows attackers to manipulate Link headers, potentially leading to unauthorized access or data exfiltration.

Vulnerability Detail

The vulnerability arises from improper encoding or escaping of output in the cow_link:link/1 function. This function directly interpolates user-supplied values into the serialized Link header without adequate validation or escaping. An attacker can exploit this by injecting special characters into the target URI, rel value, or attribute keys, allowing them to craft malicious Link headers. This can lead to browsers making out-of-band connections to attacker-controlled origins, posing significant security risks.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, sanitize all values before passing them to cow_link:link/1. Specifically, reject or strip any target value containing '>', any rel value containing '"' or '', and any attribute key containing characters outside the HTTP token grammar. Here is a sample code snippet for sanitization:

function sanitize_input(target, rel, attributes) {
    if (target.includes('>') || rel.includes('"') || rel.includes('\')) {
        throw new Error('Invalid input detected');
    }
    for (let key of Object.keys(attributes)) {
        if (/[^\w-]/.test(key)) {
            throw new Error('Invalid attribute key detected');
        }
    }
    return { target, rel, attributes };
}

Conclusion

CVE-2026-43971 represents a significant security risk for applications using the cowlib package. It is crucial to update to the latest version or implement the recommended workarounds to protect against potential exploits. Regular monitoring for vulnerabilities using tools like Vulert can help maintain application security.

See every vulnerability recorded for cowlib →

Share this vulnerability

FAQ

CVE-2026-43971 is a vulnerability in the cowlib package that allows for Link header directive smuggling due to improper encoding of output.

All versions of cowlib from 2.9.0 onward are affected by this vulnerability.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

If you cannot update the package, implement the suggested workaround to sanitize inputs before passing them to cow_link:link/1.

The CVSS score of this vulnerability is 6.3, indicating a moderate severity level.

Related vulnerabilities

Recent vulnerabilities recorded for cowlib.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback