{"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-05-29T05:40:32.669919Z","published":"2022-04-27T08:00:00Z","database_specific":{"affects":"both","package":"curl","severity":"Medium","www":"https://curl.se/docs/CVE-2022-22576.html","CWE":{"desc":"Authentication Bypass by Primary Weakness","id":"CWE-305"},"URL":"https://curl.se/docs/CVE-2022-22576.json","award":{"amount":"2400","currency":"USD"},"issue":"https://hackerone.com/reports/1526328","last_affected":"7.82.0"},"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","curl-7_82_0","curl-7_81_0","curl-7_80_0","curl-7_79_1","curl-7_79_0","curl-7_78_0","curl-7_77_0","curl-7_76_1","curl-7_76_0","curl-7_75_0","curl-7_74_0","curl-7_73_0","tiny-curl-7_72_0","curl-7_72_0","curl-7_71_1","curl-7_71_0","curl-7_70_0","curl-7_69_1","curl-7_69_0","curl-7_68_0","curl-7_67_0","curl-7_66_0","curl-7_65_3","curl-7_65_2","curl-7_65_1","curl-7_65_0","curl-7_64_1","curl-7_64_0","curl-7_63_0","curl-7_62_0","curl-7_61_1","curl-7_61_0","curl-7_60_0","curl-7_59_0","curl-7_58_0","curl-7_57_0","curl-7_56_1","curl-7_56_0","curl-7_55_1","curl-7_55_0","curl-7_54_1","curl-7_54_0","curl-7_53_1","curl-7_53_0","curl-7_52_1","curl-7_52_0","curl-7_51_0","curl-7_50_3","curl-7_50_2","curl-7_50_1","curl-7_50_0","curl-7_49_1","curl-7_49_0","curl-7_48_0","curl-7_47_1","curl-7_47_0","curl-7_46_0","curl-7_45_0","curl-7_44_0","curl-7_43_0","curl-7_42_1","curl-7_42_0","curl-7_41_0","curl-7_40_0","curl-7_39_0","curl-7_38_0","curl-7_37_1","curl-7_37_0","curl-7_36_0","curl-7_35_0","curl-7_34_0","curl-7_33_0"],"database_specific":{"source":"https://curl.se/docs/CURL-CVE-2022-22576.json","vanir_signatures_modified":"2026-05-29T05:40:32Z","vanir_signatures":[{"digest":{"line_hashes":["58259199269834853276010218403496030245","294396197503886632286020947397231640911","78590371543023549742567242977345257926","200816818971994359683925580495066280726"],"threshold":0.9},"id":"CURL-CVE-2022-22576-0eca3534","signature_type":"Line","signature_version":"v1","source":"https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425","target":{"file":"lib/urldata.h"},"deprecated":false},{"deprecated":false,"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},"id":"CURL-CVE-2022-22576-17e36f02","signature_type":"Line","signature_version":"v1","source":"https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425","target":{"file":"lib/vtls/vtls.c"}},{"source":"https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425","target":{"file":"lib/url.c","function":"create_conn"},"deprecated":false,"digest":{"function_hash":"232769562899590504328816257288465941567","length":10210},"id":"CURL-CVE-2022-22576-1ed77fdc","signature_type":"Function","signature_version":"v1"},{"source":"https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425","target":{"file":"lib/url.c","function":"conn_free"},"deprecated":false,"digest":{"function_hash":"315632358659867224200111941378429278205","length":1240},"id":"CURL-CVE-2022-22576-2827ee1b","signature_type":"Function","signature_version":"v1"},{"signature_version":"v1","source":"https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425","target":{"file":"lib/url.c","function":"ConnectionExists"},"deprecated":false,"digest":{"function_hash":"313306748003713758833708885016493009832","length":7730},"id":"CURL-CVE-2022-22576-656aa914","signature_type":"Function"},{"deprecated":false,"digest":{"function_hash":"49760104068136346591452435977634428264","length":179},"id":"CURL-CVE-2022-22576-84935836","signature_type":"Function","signature_version":"v1","source":"https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425","target":{"function":"safecmp","file":"lib/vtls/vtls.c"}},{"digest":{"line_hashes":["205626891793478041329601926580379702650"],"threshold":0.9},"id":"CURL-CVE-2022-22576-9a848b3c","signature_type":"Line","signature_version":"v1","source":"https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425","target":{"file":"lib/strcase.h"},"deprecated":false},{"signature_version":"v1","source":"https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425","target":{"file":"lib/url.c"},"deprecated":false,"digest":{"threshold":0.9,"line_hashes":["248080550513763933379421547446316423509","31680295949215721977297077975251584896","312319431893952030470025865649966935262","318263350038963178288788772173899173632","77096557681742886896863986532760488600","206619088639161047010868169248691550821","124080114129794289289393572187731930758","230523409755139232336302673927471314284","183487641048656492491546255641374939470","164766160184776116373789411106026226164","101567081819988502529662363128725017594"]},"id":"CURL-CVE-2022-22576-c615994b","signature_type":"Line"},{"signature_type":"Line","signature_version":"v1","source":"https://github.com/curl/curl.git/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425","target":{"file":"lib/strcase.c"},"deprecated":false,"digest":{"line_hashes":["176084909825676078863161205171299297476","328827321545062459626361455841054239451","110144098323748351620261025060077450548"],"threshold":0.9},"id":"CURL-CVE-2022-22576-e1dd1415"}]}}],"schema_version":"1.7.5","credits":[{"name":"Patrick Monnerat","type":"FINDER"},{"name":"Patrick Monnerat","type":"REMEDIATION_DEVELOPER"}]}