{"id":"CURL-CVE-2022-22576","summary":"OAUTH2 bearer bypass in connection reuse","details":"libcurl might reuse OAUTH2-authenticated connections without properly making\nsure that the connection was authenticated with the same credentials as set\nfor this transfer. This affects SASL-enabled protocols: SMTP(S), IMAP(S),\nPOP3(S) and LDAP(S) (OpenLDAP only).\n\nlibcurl maintains a pool of live connections after a transfer has completed\n(sometimes called the connection cache). This pool of connections is then gone\nthrough when a new transfer is requested and if there is a live connection\navailable that can be reused, it is preferred instead of creating a new one.\n\nDue to this security vulnerability, a connection that is successfully created\nand authenticated with a username + OAUTH2 bearer could subsequently be\nerroneously reused even for user + [other OAUTH2 bearer], even though that\nmight not even be a valid bearer. This could lead to an authentication bypass,\neither by mistake or by a malicious actor.","aliases":["CVE-2022-22576"],"modified":"2026-04-25T20:38:44.435519Z","published":"2022-04-27T08:00:00Z","database_specific":{"issue":"https://hackerone.com/reports/1526328","www":"https://curl.se/docs/CVE-2022-22576.html","severity":"Medium","affects":"both","URL":"https://curl.se/docs/CVE-2022-22576.json","package":"curl","CWE":{"desc":"Authentication Bypass by Primary Weakness","id":"CWE-305"},"last_affected":"7.82.0","award":{"amount":"2400","currency":"USD"}},"affected":[{"ranges":[{"type":"SEMVER","events":[{"introduced":"7.33.0"},{"fixed":"7.83.0"}]},{"type":"GIT","repo":"https://github.com/curl/curl.git","events":[{"introduced":"19a05c908f7d8be82de6f69f533317d8a0db49dd"},{"fixed":"852aa5ad351ea53e5f01d2f44b5b4370c2bf5425"}]}],"versions":["7.82.0","7.81.0","7.80.0","7.79.1","7.79.0","7.78.0","7.77.0","7.76.1","7.76.0","7.75.0","7.74.0","7.73.0","7.72.0","7.71.1","7.71.0","7.70.0","7.69.1","7.69.0","7.68.0","7.67.0","7.66.0","7.65.3","7.65.2","7.65.1","7.65.0","7.64.1","7.64.0","7.63.0","7.62.0","7.61.1","7.61.0","7.60.0","7.59.0","7.58.0","7.57.0","7.56.1","7.56.0","7.55.1","7.55.0","7.54.1","7.54.0","7.53.1","7.53.0","7.52.1","7.52.0","7.51.0","7.50.3","7.50.2","7.50.1","7.50.0","7.49.1","7.49.0","7.48.0","7.47.1","7.47.0","7.46.0","7.45.0","7.44.0","7.43.0","7.42.1","7.42.0","7.41.0","7.40.0","7.39.0","7.38.0","7.37.1","7.37.0","7.36.0","7.35.0","7.34.0","7.33.0"],"database_specific":{"source":"https://curl.se/docs/CURL-CVE-2022-22576.json","vanir_signatures_modified":"2026-04-25T20:38:44Z","vanir_signatures":[{"signature_version":"v1","source":"https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425","id":"CURL-CVE-2022-22576-0eca3534","deprecated":false,"digest":{"threshold":0.9,"line_hashes":["58259199269834853276010218403496030245","294396197503886632286020947397231640911","78590371543023549742567242977345257926","200816818971994359683925580495066280726"]},"target":{"file":"lib/urldata.h"},"signature_type":"Line"},{"signature_version":"v1","source":"https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425","id":"CURL-CVE-2022-22576-17e36f02","deprecated":false,"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"]},"target":{"file":"lib/vtls/vtls.c"},"signature_type":"Line"},{"signature_version":"v1","source":"https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425","id":"CURL-CVE-2022-22576-1ed77fdc","deprecated":false,"digest":{"length":10210,"function_hash":"232769562899590504328816257288465941567"},"target":{"file":"lib/url.c","function":"create_conn"},"signature_type":"Function"},{"signature_version":"v1","source":"https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425","id":"CURL-CVE-2022-22576-2827ee1b","deprecated":false,"digest":{"length":1240,"function_hash":"315632358659867224200111941378429278205"},"target":{"file":"lib/url.c","function":"conn_free"},"signature_type":"Function"},{"signature_version":"v1","source":"https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425","id":"CURL-CVE-2022-22576-656aa914","deprecated":false,"digest":{"length":7730,"function_hash":"313306748003713758833708885016493009832"},"target":{"file":"lib/url.c","function":"ConnectionExists"},"signature_type":"Function"},{"signature_version":"v1","source":"https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425","id":"CURL-CVE-2022-22576-84935836","deprecated":false,"digest":{"length":179,"function_hash":"49760104068136346591452435977634428264"},"target":{"file":"lib/vtls/vtls.c","function":"safecmp"},"signature_type":"Function"},{"signature_version":"v1","source":"https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425","id":"CURL-CVE-2022-22576-9a848b3c","deprecated":false,"digest":{"threshold":0.9,"line_hashes":["205626891793478041329601926580379702650"]},"target":{"file":"lib/strcase.h"},"signature_type":"Line"},{"signature_version":"v1","source":"https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425","id":"CURL-CVE-2022-22576-c615994b","deprecated":false,"digest":{"threshold":0.9,"line_hashes":["248080550513763933379421547446316423509","31680295949215721977297077975251584896","312319431893952030470025865649966935262","318263350038963178288788772173899173632","77096557681742886896863986532760488600","206619088639161047010868169248691550821","124080114129794289289393572187731930758","230523409755139232336302673927471314284","183487641048656492491546255641374939470","164766160184776116373789411106026226164","101567081819988502529662363128725017594"]},"target":{"file":"lib/url.c"},"signature_type":"Line"},{"signature_version":"v1","source":"https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425","id":"CURL-CVE-2022-22576-e1dd1415","deprecated":false,"digest":{"threshold":0.9,"line_hashes":["176084909825676078863161205171299297476","328827321545062459626361455841054239451","110144098323748351620261025060077450548"]},"target":{"file":"lib/strcase.c"},"signature_type":"Line"}]}}],"schema_version":"1.7.5","credits":[{"name":"Patrick Monnerat","type":"FINDER"},{"name":"Patrick Monnerat","type":"REMEDIATION_DEVELOPER"}]}