CURL-CVE-2024-6874

Source
https://curl.se/docs/CVE-2024-6874.html
Import Source
https://curl.se/docs/CURL-CVE-2024-6874.json
JSON Data
https://api.osv.dev/v1/vulns/CURL-CVE-2024-6874
Aliases
Published
2024-07-24T08:00:00Z
Modified
2026-05-27T02:29:29Z
Summary
macidn punycode buffer overread
Details

libcurl's URL API function curl_url_get() offers punycode conversions, to and from IDN. Asking to convert a name that is exactly 256 bytes, libcurl ends up reading outside of a stack based buffer when built to use the macidn IDN backend. The conversion function then fills up the provided buffer exactly - but does not null-terminate the string.

This flaw can lead to stack contents accidentally getting returned as part of the converted string.

Database specific
{
    "CWE": {
        "desc": "Buffer Over-read",
        "id": "CWE-126"
    },
    "URL": "https://curl.se/docs/CVE-2024-6874.json",
    "affects": "lib",
    "award": {
        "amount": "540",
        "currency": "USD"
    },
    "issue": "https://hackerone.com/reports/2604391",
    "last_affected": "8.8.0",
    "package": "curl",
    "severity": "Low",
    "www": "https://curl.se/docs/CVE-2024-6874.html"
}
Credits
    • z2_ - FINDER
    • z2_ - REMEDIATION_DEVELOPER

Affected packages

Git / github.com/curl/curl.git

Affected ranges

Type
SEMVER
Events
Introduced
8.8.0
Fixed
8.9.0
Type
GIT
Repo
https://github.com/curl/curl.git
Events

Affected versions

8.*
8.8.0
Other
curl-8_8_0

Database specific

source
"https://curl.se/docs/CURL-CVE-2024-6874.json"
vanir_signatures
[
    {
        "deprecated": false,
        "digest": {
            "function_hash": "216640968448479456553636563154165417207",
            "length": 575
        },
        "id": "CURL-CVE-2024-6874-6c58f535",
        "signature_type": "Function",
        "signature_version": "v1",
        "source": "https://github.com/curl/curl.git/commit/686d54baf1df6e0775898f484d1670742898b3b2",
        "target": {
            "file": "lib/idn.c",
            "function": "mac_idn_to_ascii"
        }
    },
    {
        "deprecated": false,
        "digest": {
            "function_hash": "172764687688659853305595737277601779273",
            "length": 577
        },
        "id": "CURL-CVE-2024-6874-dfa7777d",
        "signature_type": "Function",
        "signature_version": "v1",
        "source": "https://github.com/curl/curl.git/commit/686d54baf1df6e0775898f484d1670742898b3b2",
        "target": {
            "file": "lib/idn.c",
            "function": "mac_ascii_to_idn"
        }
    },
    {
        "deprecated": false,
        "digest": {
            "line_hashes": [
                "98002545464681941635236377462148785051",
                "232850703124931391163673421933204740841",
                "112771001505927567012460810966684188462",
                "248033720349314409798132084819429479132",
                "113651119734714053058587916180594786732",
                "232306955307703962923429757053563269400",
                "101837938303599049161117334065762530211",
                "248033720349314409798132084819429479132"
            ],
            "threshold": 0.9
        },
        "id": "CURL-CVE-2024-6874-e762d376",
        "signature_type": "Line",
        "signature_version": "v1",
        "source": "https://github.com/curl/curl.git/commit/686d54baf1df6e0775898f484d1670742898b3b2",
        "target": {
            "file": "lib/idn.c"
        }
    }
]
vanir_signatures_modified
"2026-05-27T02:29:29Z"