Low

commonground-api-common unexploitable privilege escalation in JWT authentication middleware

  • Disclosed: 09.02.2024
  • Updated: 11.10.2026 12:18

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 software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Python (PyPI) commonground-api-common <= 1.12.1 no fix
Python (PyPI) vng-api-common <= 2.0.5 no fix
Python (PyPI) vng-api-common-utrecht <= 1.3.2 no fix

References

CVSS score -
Weakness (CWE)
-
Platform
Python (PyPI)
Package
commonground-api-common, vng-api-common, vng-api-common-utrecht
Disclosed
09.02.2024
Updated
11.10.2026 12:18

Sources and licenses

OSV / GitHub Advisory Database - GHSA-c4cm-r9fh-jgj9 - CC BY 4.0

Vulnerability history: commonground-api-common

All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.

This is the only known vulnerability of this package.

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.