Bug 2329527 (CVE-2024-53861)

Summary: CVE-2024-53861 pyjwt: Issuer field partial matches allowed in pyjwt
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: adudiak, anpicker, aprice, bdettelb, bparees, brking, caswilli, doconnor, ehelms, ggainey, gtanzill, haoli, hasun, hkataria, jcammara, jfula, jmitchel, jneedle, jowilson, jsamir, jtanner, juwatts, jwong, kaycoth, kegrant, kholdawa, koliveir, kshier, luizcosta, mabashia, mhulan, mminar, mpierce, nmoumoul, nweather, nyancey, omaciel, ometelka, pbraun, pcreech, ptisnovs, rbiba, rbobbitt, rchan, shvarugh, simaishi, smallamp, smcdonal, sskracic, stcannon, syedriko, teagle, tfister, thavo, xdharmai, yguenane, zkayyali
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the pyJWT package. An incorrect string comparison is run for `iss` checking, which allows for partial matches. This results in `if "abc" not in "__abcd__":` being checked instead of `if "abc" != "__abc__":`. Signature checks are still present so real world impact is likely limited to denial of service scenarios.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2024-11-29 19:01:03 UTC
pyjwt is a JSON Web Token implementation in Python. An incorrect string comparison is run for `iss` checking, resulting in `"acb"` being accepted for `"_abc_"`. This is a bug introduced in version 2.10.0: checking the "iss" claim changed from `isinstance(issuer, list)` to `isinstance(issuer, Sequence)`. Since str is a Sequnce, but not a list, `in` is also used for string comparison. This results in `if "abc" not in "__abcd__":` being checked instead of `if "abc" != "__abc__":`. Signature checks are still present so real world impact is likely limited to denial of service scenarios. This issue has been patched in version 2.10.1. All users are advised to upgrade. There are no known workarounds for this vulnerability.