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.
{
"last_affected": "7.82.0",
"severity": "Medium",
"award": {
"amount": "2400",
"currency": "USD"
},
"package": "curl",
"CWE": {
"desc": "Authentication Bypass by Primary Weakness",
"id": "CWE-305"
},
"URL": "https://curl.se/docs/CVE-2022-22576.json",
"affects": "both",
"www": "https://curl.se/docs/CVE-2022-22576.html",
"issue": "https://hackerone.com/reports/1526328"
}[
{
"id": "CURL-CVE-2022-22576-0eca3534",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"58259199269834853276010218403496030245",
"294396197503886632286020947397231640911",
"78590371543023549742567242977345257926",
"200816818971994359683925580495066280726"
]
},
"deprecated": false,
"source": "https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425",
"target": {
"file": "lib/urldata.h"
},
"signature_version": "v1"
},
{
"id": "CURL-CVE-2022-22576-17e36f02",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"86903027126095287104123757752708765486",
"44720551875179399004381956353178122180",
"34879492751838601925948714301221924352",
"307688321766610902876175559712764398889",
"245139514547154983925921870038563502633",
"110890051936132654875175968532763685530",
"297062367226438086812293607233676715413",
"197375962886441159790956219057648396496",
"248016129877143886229574845968160069824",
"71686248172881489132962617559909369894",
"149040547399085134523628283748476493915",
"44626021511392020250969829294805214661",
"181173808768575193318751601021425637446",
"294988164769936192321497125215764979042",
"305847340517085724868082159878178147697",
"29973701791926881430846087993158545998",
"145600217765864882581341827729333230521",
"82999712505788900535937068531666439223",
"162937275451028946642750577947894658454",
"125341153304869410480491850512867873541"
]
},
"deprecated": false,
"source": "https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425",
"target": {
"file": "lib/vtls/vtls.c"
},
"signature_version": "v1"
},
{
"id": "CURL-CVE-2022-22576-1ed77fdc",
"signature_type": "Function",
"digest": {
"length": 10210.0,
"function_hash": "232769562899590504328816257288465941567"
},
"deprecated": false,
"source": "https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425",
"target": {
"function": "create_conn",
"file": "lib/url.c"
},
"signature_version": "v1"
},
{
"id": "CURL-CVE-2022-22576-2827ee1b",
"signature_type": "Function",
"digest": {
"length": 1240.0,
"function_hash": "315632358659867224200111941378429278205"
},
"deprecated": false,
"source": "https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425",
"target": {
"function": "conn_free",
"file": "lib/url.c"
},
"signature_version": "v1"
},
{
"id": "CURL-CVE-2022-22576-656aa914",
"signature_type": "Function",
"digest": {
"length": 7730.0,
"function_hash": "313306748003713758833708885016493009832"
},
"deprecated": false,
"source": "https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425",
"target": {
"function": "ConnectionExists",
"file": "lib/url.c"
},
"signature_version": "v1"
},
{
"id": "CURL-CVE-2022-22576-84935836",
"signature_type": "Function",
"digest": {
"length": 179.0,
"function_hash": "49760104068136346591452435977634428264"
},
"deprecated": false,
"source": "https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425",
"target": {
"function": "safecmp",
"file": "lib/vtls/vtls.c"
},
"signature_version": "v1"
},
{
"id": "CURL-CVE-2022-22576-9a848b3c",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"205626891793478041329601926580379702650"
]
},
"deprecated": false,
"source": "https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425",
"target": {
"file": "lib/strcase.h"
},
"signature_version": "v1"
},
{
"id": "CURL-CVE-2022-22576-c615994b",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"248080550513763933379421547446316423509",
"31680295949215721977297077975251584896",
"312319431893952030470025865649966935262",
"318263350038963178288788772173899173632",
"77096557681742886896863986532760488600",
"206619088639161047010868169248691550821",
"124080114129794289289393572187731930758",
"230523409755139232336302673927471314284",
"183487641048656492491546255641374939470",
"164766160184776116373789411106026226164",
"101567081819988502529662363128725017594"
]
},
"deprecated": false,
"source": "https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425",
"target": {
"file": "lib/url.c"
},
"signature_version": "v1"
},
{
"id": "CURL-CVE-2022-22576-e1dd1415",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"176084909825676078863161205171299297476",
"328827321545062459626361455841054239451",
"110144098323748351620261025060077450548"
]
},
"deprecated": false,
"source": "https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425",
"target": {
"file": "lib/strcase.c"
},
"signature_version": "v1"
}
]