NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐍 PyPI
Not in CISA KEV

commonground-api-common unexploitable privilege escalation in JWT authentication middlewareGHSA-c4cm-r9fh-jgj9

Fix: maykinmedia/commonground-api-common@20d9345

GHSA-c4cm-r9fh-jgj9 is a security vulnerability in commonground-api-common. The records list no fixed version yet; check the vendor advisory below and apply the mitigations in the meantime.

Published
Updated
Affected
3 pkgs
Patched
See advisory
Exploits
None indexed
Exploitation data as of Dec 6, 2024 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

3 pkgs affected
🐍commonground-api-common🐍vng-api-common🐍vng-api-common-utrecht

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

Description

Impact

This is a privilege escalation vulnerability. The impact is negligible and entirely theoretical.

A non-exploitable weakness was found in how the client-supplied JWTs are verified. Because an explicit allow-list of known algorithms is used in the PyJWT library, user-supplied (invalid) algorithms are rejected.

If this was not the case, then the client JWTs could be tampered with, resulting in privilege escalation which would allow the attacker to perform any operation as any client (impersonation) without leaving a trace of the real user/client.

Patches

Will be fixed in 1.12.2

Workarounds

None needed. But be careful when updating PyJWT. Check that the used PyJWT has no algorithms specified with a name in "", "HS25", "HS2", "HS", "H", or that those algorithms are acceptable.

Details

The header and payload of JSON Web Tokens (JWTs) are cryptographically signed with an algorithm. A JWT has a header field alg that specifies the algorithm used in the signature.

The vng-api-common.middleware.AuthMiddleware uses PyJWT to check the validity of JWT and indicates it should be "HS256", otherwise an attacker could construct a token with a cryptographically weak token. It should indicate this with a list of acceptable algorithms ["HS256"], but instead the string "HS256" is passed to PyJWT. PyJWT does not check the type of the argument and checks if the alg string in the header exists in the acceptable algorithms value with the in operator. Any substring of "HS256" passes this in check. It is not exploitable because there is no such substring in de set of algorithms PyJWT supports.

Affected Packages

3 total
EcosystemPackageVulnerable rangeFix
🐍PyPIcommonground-api-commonall versionsNo fix
🐍PyPIvng-api-commonall versionsNo fix
🐍PyPIvng-api-common-utrechtall versionsNo fix

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for commonground-api-common, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Remediation status

    The records we use list no patched version of commonground-api-common for GHSA-c4cm-r9fh-jgj9. Check the maintainer's advisory, and where your build allows, override or pin the dependency away from the vulnerable range.

  3. Mitigate without a patch

    Close the privilege gap rather than the entry point: audit which accounts, roles and service identities can reach the affected operation, drop the component to the least privilege it actually needs, and review file and directory permissions created by earlier installs — a default left in place is what makes this reachable.

Frequently Asked Questions

### Impact This is a privilege escalation vulnerability. The impact is negligible and entirely theoretical. A non-exploitable weakness was found in how the client-supplied JWTs are verified. Because an explicit allow-list of known algorithms is used in the PyJWT library, user-supplied (invalid) algorithms are rejected. If this was not the case, then the client JWTs could be tampered with, resulting in privilege escalation which would allow the attacker to perform any operation as any client (impersonation) without leaving a trace of the real user/client. ### Patches Will be fixed in 1.12
O3 Security · Impact-Aware SCA

Is GHSA-c4cm-r9fh-jgj9 in your dependencies?

Find it across PyPI, including transitive dependencies.

commonground-api-common unexploitable privilege…