Fix for CVE-2024-33664. JWE limited to 250K - #352
Conversation
omufeed
commented
May 8, 2024
Is this repository still maintained? Would be great to check and merge this PR. |
Shinnnyshinshin
commented
May 8, 2024
Thank you for this work @alistairwatts. Would love to see this PR go in. |
CharlesPerrotMinot
commented
May 10, 2024
| # data could lead to large memory usage. This helps address This addresses | ||
| # CVE-2024-33664. Also see _decompress() | ||
| if len(jwe_str) > JWE_SIZE_LIMIT: | ||
| raise JWEError("JWE string exceeds {JWE_SIZE_LIMIT} bytes") |
There was a problem hiding this comment.
This should be an f-string.
smittysmee
commented
May 21, 2024
maciejstromich
commented
May 22, 2024
if @mpdavis does not work maybe @michaeldavis-wf will? |
libo
left a comment
There was a problem hiding this comment.
I fixed the missing f-string. @alistairwatts
Uh oh!
There was an error while loading. Please reload this page.
twwildey
commented
May 30, 2024
Can you rebase your changes onto the latest |
https://build.opensuse.org/request/show/1178245 by user dgarcia + anag+factory - Update CVE-2024-33664.patch with upstream mpdavis/python-jose#352 bsc#1223422
CharlesPerrotMinot
commented
Jun 3, 2024
phasath
commented
Sep 20, 2024
Any updates here? |
BEEFF
commented
Nov 13, 2024
Right now we should be checking the length of the tokens at the API level whilst waiting for this fix? Dependabot brought me here. |
b2e97ab to
f7e0759Comparef7e0759 to
b91c69cCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
eed962f to
17db60bCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This fix for CVE-2024-33664 ensures that any incoming JWE is under 250K, which seems to be a sensible, albeit large limit. The specific fix for the "zip bomb" issue ensures that we decompress no more that 250K of data. If that limit is reached then a JWEError is raised.
There's rough symmetry here ensuring that both compressed and uncompressed JWE data is no more than 250K.