Heap-buffer-overflow in Curl_headers_push in curl

curl Updated 02 Oct 2025

Summary

02/06/2022
HIGH
Yes i
High
Not published

OSV-2022-450: Heap-buffer-overflow in Curl_headers_push. Affects curl versions >= 4d94fac9f0d1dd02b8308291e4c47651142dc28b, < f810047f9d7a983c4479ae07f79282b7c9b54ccb. Fixed in f810047f9d7a983c4479ae07f79282b7c9b54ccb. 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

Curl is a widely used open-source library and command-line tool for transferring data with URLs. It supports various protocols and is known for its versatility and robustness. However, a vulnerability has been discovered in the Curl_headers_push function, which can lead to a heap-buffer-overflow write. This vulnerability affects the curl package.

Vulnerability Detail

The vulnerability arises from a heap-buffer-overflow write in the Curl_headers_push function. This can be triggered when processing headers during HTTP communication. An attacker could exploit this vulnerability to overwrite adjacent memory, potentially leading to arbitrary code execution or a denial-of-service condition. The vulnerability has been assigned a severity rating of HIGH.

How To Fix

Minimum fixed version

f810047f9d7a983c4479ae07f79282b7c9b54ccb

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

Currently, there is no known workaround for this vulnerability. It is advised to update the curl package to a fixed version as soon as possible.

Conclusion

In conclusion, the curl package is vulnerable to a heap-buffer-overflow write in the Curl_headers_push function. This can be exploited by an attacker to execute arbitrary code or cause a denial-of-service. To mitigate this vulnerability, it is crucial to update the curl package to a version that includes the fix. For further assistance with vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for curl →

Share this vulnerability

FAQ

Curl is an open-source library and command-line tool for transferring data with URLs. It supports various protocols and is widely used in software development.

A heap-buffer-overflow is a type of memory vulnerability where a program writes data beyond the bounds of a heap-allocated buffer. This can lead to memory corruption and potentially allow an attacker to execute arbitrary code or cause a denial-of-service.

An attacker can exploit this vulnerability by crafting malicious HTTP headers that trigger the heap-buffer-overflow write. By overwriting adjacent memory, the attacker may be able to execute arbitrary code or cause the application to crash.

This vulnerability has been assigned a severity rating of HIGH due to its potential for arbitrary code execution or denial-of-service.

Yes, a fix for this vulnerability has been implemented in commit f810047f9d7a983c4479ae07f79282b7c9b54ccb. It is recommended to update the curl package to a version that includes this fix.

Related vulnerabilities

Recent vulnerabilities recorded for curl.

How To Fix

Minimum fixed version

f810047f9d7a983c4479ae07f79282b7c9b54ccb

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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