CURL-CVE-2022-22576

Source
https://curl.se/docs/CVE-2022-22576.html
Import Source
https://curl.se/docs/CURL-CVE-2022-22576.json
JSON Data
https://api.osv.dev/v1/vulns/CURL-CVE-2022-22576
Aliases
Published
2022-04-27T08:00:00Z
Modified
2025-09-27T10:58:29Z
Summary
OAUTH2 bearer bypass in connection reuse
Details

libcurl might reuse OAUTH2-authenticated connections without properly making sure that the connection was authenticated with the same credentials as set for this transfer. This affects SASL-enabled protocols: SMTP(S), IMAP(S), POP3(S) and LDAP(S) (OpenLDAP only).

libcurl maintains a pool of live connections after a transfer has completed (sometimes called the connection cache). This pool of connections is then gone through when a new transfer is requested and if there is a live connection available that can be reused, it is preferred instead of creating a new one.

Due to this security vulnerability, a connection that is successfully created and authenticated with a username + OAUTH2 bearer could subsequently be erroneously reused even for user + [other OAUTH2 bearer], even though that might not even be a valid bearer. This could lead to an authentication bypass, either by mistake or by a malicious actor.

Database specific
{
    "affects": "both",
    "last_affected": "7.82.0",
    "www": "https://curl.se/docs/CVE-2022-22576.html",
    "severity": "Medium",
    "CWE": {
        "desc": "Authentication Bypass by Primary Weakness",
        "id": "CWE-305"
    },
    "award": {
        "amount": "2400",
        "currency": "USD"
    },
    "issue": "https://hackerone.com/reports/1526328",
    "package": "curl",
    "URL": "https://curl.se/docs/CVE-2022-22576.json"
}
References
Credits
    • Patrick Monnerat - FINDER
    • Patrick Monnerat - REMEDIATION_DEVELOPER

Affected packages

Git / github.com/curl/curl.git

Affected ranges

Type
SEMVER
Events
Introduced
7.33.0
Fixed
7.83.0
Type
GIT
Repo
https://github.com/curl/curl.git
Events

Affected versions

7.*

7.33.0
7.34.0
7.35.0
7.36.0
7.37.0
7.37.1
7.38.0
7.39.0
7.40.0
7.41.0
7.42.0
7.42.1
7.43.0
7.44.0
7.45.0
7.46.0
7.47.0
7.47.1
7.48.0
7.49.0
7.49.1
7.50.0
7.50.1
7.50.2
7.50.3
7.51.0
7.52.0
7.52.1
7.53.0
7.53.1
7.54.0
7.54.1
7.55.0
7.55.1
7.56.0
7.56.1
7.57.0
7.58.0
7.59.0
7.60.0
7.61.0
7.61.1
7.62.0
7.63.0
7.64.0
7.64.1
7.65.0
7.65.1
7.65.2
7.65.3
7.66.0
7.67.0
7.68.0
7.69.0
7.69.1
7.70.0
7.71.0
7.71.1
7.72.0
7.73.0
7.74.0
7.75.0
7.76.0
7.76.1
7.77.0
7.78.0
7.79.0
7.79.1
7.80.0
7.81.0
7.82.0

Database specific

vanir_signatures

[
    {
        "source": "https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425",
        "target": {
            "file": "lib/urldata.h"
        },
        "signature_version": "v1",
        "deprecated": false,
        "id": "CURL-CVE-2022-22576-0eca3534",
        "digest": {
            "line_hashes": [
                "58259199269834853276010218403496030245",
                "294396197503886632286020947397231640911",
                "78590371543023549742567242977345257926",
                "200816818971994359683925580495066280726"
            ],
            "threshold": 0.9
        },
        "signature_type": "Line"
    },
    {
        "source": "https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425",
        "target": {
            "file": "lib/vtls/vtls.c"
        },
        "signature_version": "v1",
        "deprecated": false,
        "id": "CURL-CVE-2022-22576-17e36f02",
        "digest": {
            "line_hashes": [
                "86903027126095287104123757752708765486",
                "44720551875179399004381956353178122180",
                "34879492751838601925948714301221924352",
                "307688321766610902876175559712764398889",
                "245139514547154983925921870038563502633",
                "110890051936132654875175968532763685530",
                "297062367226438086812293607233676715413",
                "197375962886441159790956219057648396496",
                "248016129877143886229574845968160069824",
                "71686248172881489132962617559909369894",
                "149040547399085134523628283748476493915",
                "44626021511392020250969829294805214661",
                "181173808768575193318751601021425637446",
                "294988164769936192321497125215764979042",
                "305847340517085724868082159878178147697",
                "29973701791926881430846087993158545998",
                "145600217765864882581341827729333230521",
                "82999712505788900535937068531666439223",
                "162937275451028946642750577947894658454",
                "125341153304869410480491850512867873541"
            ],
            "threshold": 0.9
        },
        "signature_type": "Line"
    },
    {
        "source": "https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425",
        "target": {
            "function": "create_conn",
            "file": "lib/url.c"
        },
        "signature_version": "v1",
        "deprecated": false,
        "id": "CURL-CVE-2022-22576-1ed77fdc",
        "digest": {
            "function_hash": "232769562899590504328816257288465941567",
            "length": 10210.0
        },
        "signature_type": "Function"
    },
    {
        "source": "https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425",
        "target": {
            "function": "conn_free",
            "file": "lib/url.c"
        },
        "signature_version": "v1",
        "deprecated": false,
        "id": "CURL-CVE-2022-22576-2827ee1b",
        "digest": {
            "function_hash": "315632358659867224200111941378429278205",
            "length": 1240.0
        },
        "signature_type": "Function"
    },
    {
        "source": "https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425",
        "target": {
            "function": "ConnectionExists",
            "file": "lib/url.c"
        },
        "signature_version": "v1",
        "deprecated": false,
        "id": "CURL-CVE-2022-22576-656aa914",
        "digest": {
            "function_hash": "313306748003713758833708885016493009832",
            "length": 7730.0
        },
        "signature_type": "Function"
    },
    {
        "source": "https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425",
        "target": {
            "function": "safecmp",
            "file": "lib/vtls/vtls.c"
        },
        "signature_version": "v1",
        "deprecated": false,
        "id": "CURL-CVE-2022-22576-84935836",
        "digest": {
            "function_hash": "49760104068136346591452435977634428264",
            "length": 179.0
        },
        "signature_type": "Function"
    },
    {
        "source": "https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425",
        "target": {
            "file": "lib/strcase.h"
        },
        "signature_version": "v1",
        "deprecated": false,
        "id": "CURL-CVE-2022-22576-9a848b3c",
        "digest": {
            "line_hashes": [
                "205626891793478041329601926580379702650"
            ],
            "threshold": 0.9
        },
        "signature_type": "Line"
    },
    {
        "source": "https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425",
        "target": {
            "file": "lib/url.c"
        },
        "signature_version": "v1",
        "deprecated": false,
        "id": "CURL-CVE-2022-22576-c615994b",
        "digest": {
            "line_hashes": [
                "248080550513763933379421547446316423509",
                "31680295949215721977297077975251584896",
                "312319431893952030470025865649966935262",
                "318263350038963178288788772173899173632",
                "77096557681742886896863986532760488600",
                "206619088639161047010868169248691550821",
                "124080114129794289289393572187731930758",
                "230523409755139232336302673927471314284",
                "183487641048656492491546255641374939470",
                "164766160184776116373789411106026226164",
                "101567081819988502529662363128725017594"
            ],
            "threshold": 0.9
        },
        "signature_type": "Line"
    },
    {
        "source": "https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425",
        "target": {
            "file": "lib/strcase.c"
        },
        "signature_version": "v1",
        "deprecated": false,
        "id": "CURL-CVE-2022-22576-e1dd1415",
        "digest": {
            "line_hashes": [
                "176084909825676078863161205171299297476",
                "328827321545062459626361455841054239451",
                "110144098323748351620261025060077450548"
            ],
            "threshold": 0.9
        },
        "signature_type": "Line"
    }
]