Releases: latchset/jwcrypto
Version 1.5.6 - Moderate Security release
What's Changed
Full Changelog: v1.5.5...v1.5.6
Version 1.5.5
This version fixes a pypi distribution problem introduced in 1.0 when pushing was automated.
With 1.5.5 a binary wheel is now also made available on pypi.
What's Changed
- Fix doc generation by @simo5 in #345
- Update publish action to upload also binary dist by @simo5 in #347
- Fix pypi publishing by @simo5 in #348
Full Changelog: v1.5.4...v1.5.5
v1.5.4
One more release bump to address issues with typing_extensions minimum required version
Full Changelog: v1.5.3...v1.5.4
v1.5.3
Bumping release due to inconsistency in python 3.6 support that affected pypi
jwcrypto-1.5.3.tar.gz.sha512sum.txt
jwcrypto-1.5.3.tar.gz
What's Changed
Full Changelog: v1.5.2...v1.5.3
Version 1.5.2 - maintenance release
This is a minor maintenance release to improve interoperability with debuggers
Note: yanked from pypi due to 3.6 incompatibility, use 1.5.3
What's Changed
- replace deprecated package with typing_extensions by @david-homelend in #337
New Contributors
- @david-homelend made their first contribution in #337
Full Changelog: v1.5.1...v1.5.2
Version 1.5.1 - Security Release
This is a minor security release to fix a potential DoS for applications that allow the use of symmetric keys with pbkdf2.
What's Changed
- Fix X22519 import/export from PEM by @achamayou in #334
- Read the Docs now requires a config file by @simo5 in #335
- chore: refactor for removing pdb symbols by @peppelinux in #330
- Fix potential DoS issue with p2c header by @simo5 in #336
New Contributors
- @achamayou made their first contribution in #334
- @peppelinux made their first contribution in #330
Full Changelog: v1.5.0...v1.5.1
v1.5.0
Version 1.5
Minor bugfixes and the addition of Brainpool curves.
As mentioned in the commit: "The use of these algorithms is specified solely by the gematik GmbH – National Digital Health Agency - for use in german e-health applications"
This version also raises the minimum Cryptography version required to 3.4 and the minimum python version tested to 3.7
What's Changed
- Raising the bar for minimum pyca/cryptography by @simo5 in #306
- Fix typos with codespell by @cclauss in #307
- Add codespell checks in CI by @simo5 in #308
- Add Brainpool EC-curves support by @spilikin in #309
- Fix error message by @Cito in #318
- Fix assorted CI issue by @simo5 in #319
- Better support for algorithms that have different input keysize requirement by @simo5 in #324
New Contributors
Full Changelog: v1.4.2...v1.5.0
Version 1.4.2
Another minor release to fix a mistake in the compatibility heuristics which affects actual applications
What's Changed
- Fix typo in new backwards JWT compat heuristics by @jcgruenhage in #303
New Contributors
- @jcgruenhage made their first contribution in #303
Full Changelog: v1.4.1...v1.4.2
Version 1.4.1
This is a minor release focused on improving backwards compatibility with applications after the API breaking changes introduced in 1.4
This patch adds a bunch of heuristics to be able to safely autodetect a token type. It has been tested to solve the compatibility issues (ie old code works without modifications and fully securely) with at least one large application.
What's Changed
Full Changelog: v1.4.0...v1.4.1
Version 1.4
This is a security release to address CVE-2022-3102.
The JWT code can auto-detect the type of token being provided, and this can lead the application to incorrect conclusions about the trustworthiness of the token.
Quoting the private disclosure we received : "Under certain circumstances, it is possible to substitute a [..] signed JWS with a JWE that is encrypted with the public key that is normally used for signature validation."
This substitution attack can occur only if the validating application also have access to the private key, normally used to sign the tokens, available during validation of the received JWT.
The significance of this attacks depends on the use of the token, it may lead to authentication bypass or authorization bypass (respectively if claims are used to authenticate or authorize certain actions), because the attacker has full control of the data placed in the JWE and can inject any desired claim value.
Several mitigating factors exist that can protect applications from this issue:
- If the private key corresponding to the public key used to encrypt the JWE is not available to the application an exception will be raised.
- If the JWK is specified with the 'use' parameter set to 'sig' (as expected for keys used only for signing/verification) an exception will be raised.
- If the JWK is specified with the 'key_ops' parameter set and it does not include the 'decrypt' operation an exception will be raised.
- Applications may check the token type before validation, in this case they would fail to detect an expected JWS
Normally, signing and validation are done by different applications, so this scenario should be unlikely. However it is possible to have applications that both sign and validate tokens and do not separate JWKs in use, or do not set a JWK 'use' type.
Due to the mitigating factors, and the fact that specific operational constraints and conditions need to be in place to successfully exploit this issue to generate an authentication bypass, we rate this security issue as moderate. Other avenues may decide on a different rating based on use case, always verify what conditions apply to your use of the library to assess risk.
Many thanks to Tom Tervoort of Secura for finding and reporting this issue.
Important Note
In order to address this security issue certain changes had to be made that may make this update incompatible with some existing applications.
Namely, a new 'expect_type' argument has been added to JWT; this argument now defaults to 'JWS' if not explicitly set unless a non default set of algorithms that include exclusively non-signing algorithms is set. In that case the default is switched to 'JWE', this is done to be as much backwards compatible as possible with any hint we are provided.
If the token passed to JWT for validation is not of the 'expected' type, an exception will be raised on validation. Note that a token can be de-serialized w/o validation by not providing a key at the time of de-serialization. This operation will continue to work regardless of expected type.
The expectation apply exclusively at validation time. This is intentional as it allows applications that were de-serializing and then checking the type of token to keep working or do so with minimal modifications.
For applications that need more time to update there is a 'born-deprecated' module level variable that can be set to restore the old behavior and disregard expectations. See the jwcrypto jwt module documentation under the variables section for more details about that.
We strongly discourage the use of this workaround and invite application developers to refactor their code to be safe rather then apply an unsafe workaround.
What's Changed
- Upgrade GitHub Actions by @cclauss in #294
- Add support for RFC 9278: JWK Thumbprint URI by @simo5 in #295
- Add fix for CVE-2022-3102 by @simo5 in #299
New Contributors
Full Changelog: v1.3.1...v1.4.0