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.test.osv.dev/v1/vulns/CURL-CVE-2024-6874
Aliases
Published
2024-07-24T08:00:00Z
Modified
2026-05-28T08:02:45.668836Z
Summary
macidn punycode buffer overread
Details

libcurl's URL API function curlurlget() 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
{
    "package": "curl",
    "issue": "https://hackerone.com/reports/2604391",
    "award": {
        "currency": "USD",
        "amount": "540"
    },
    "URL": "https://curl.se/docs/CVE-2024-6874.json",
    "CWE": {
        "id": "CWE-126",
        "desc": "Buffer Over-read"
    },
    "www": "https://curl.se/docs/CVE-2024-6874.html",
    "severity": "Low",
    "affects": "lib",
    "last_affected": "8.8.0"
}
References
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
[
    {
        "source": "https://github.com/curl/curl.git/commit/686d54baf1df6e0775898f484d1670742898b3b2",
        "id": "CURL-CVE-2024-6874-6c58f535",
        "target": {
            "file": "lib/idn.c",
            "function": "mac_idn_to_ascii"
        },
        "deprecated": false,
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "length": 575.0,
            "function_hash": "216640968448479456553636563154165417207"
        }
    },
    {
        "source": "https://github.com/curl/curl.git/commit/686d54baf1df6e0775898f484d1670742898b3b2",
        "id": "CURL-CVE-2024-6874-dfa7777d",
        "target": {
            "file": "lib/idn.c",
            "function": "mac_ascii_to_idn"
        },
        "deprecated": false,
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "length": 577.0,
            "function_hash": "172764687688659853305595737277601779273"
        }
    },
    {
        "source": "https://github.com/curl/curl.git/commit/686d54baf1df6e0775898f484d1670742898b3b2",
        "id": "CURL-CVE-2024-6874-e762d376",
        "target": {
            "file": "lib/idn.c"
        },
        "deprecated": false,
        "signature_type": "Line",
        "signature_version": "v1",
        "digest": {
            "line_hashes": [
                "98002545464681941635236377462148785051",
                "232850703124931391163673421933204740841",
                "112771001505927567012460810966684188462",
                "248033720349314409798132084819429479132",
                "113651119734714053058587916180594786732",
                "232306955307703962923429757053563269400",
                "101837938303599049161117334065762530211",
                "248033720349314409798132084819429479132"
            ],
            "threshold": 0.9
        }
    }
]
vanir_signatures_modified
"2026-05-28T08:02:45Z"