Vulnerability DatabaseGHSA-c4cm-r9fh-jgj9

GHSA-c4cm-r9fh-jgj9
Python vulnerability analysis and mitigation

Overview

A low severity privilege escalation vulnerability was identified in commonground-api-common's JWT authentication middleware (GHSA-c4cm-r9fh-jgj9). The vulnerability affects multiple packages including commonground-api-common (<=1.12.1), vng-api-common (<=2.0.5), and vng-api-common-utrecht (<=1.3.2). The issue was discovered and disclosed on February 9, 2024, involving a non-exploitable weakness in how client-supplied JWTs are verified (GitHub Advisory).

Technical details

The vulnerability stems from how JWT verification is implemented in the vng-api-common.middleware.AuthMiddleware. The middleware uses PyJWT to verify JWT tokens and specifies 'HS256' as a string instead of using a list of acceptable algorithms ['HS256']. PyJWT's implementation doesn't check the argument type and uses the 'in' operator for algorithm verification, which means any substring of 'HS256' could potentially pass the check. However, this weakness is currently not exploitable as PyJWT's supported algorithm set doesn't include any such substrings (GitHub Commit).

Impact

The impact of this vulnerability is considered negligible and entirely theoretical. While it represents a privilege escalation vulnerability, it cannot be exploited in practice due to PyJWT's explicit allow-list of known algorithms. If it were exploitable, it could potentially allow attackers to tamper with client JWTs, leading to privilege escalation and enabling impersonation of any client without leaving traces of the real user (GitHub Advisory).

Mitigation and workarounds

The issue will be fixed in version 1.12.2 of commonground-api-common. While no immediate workarounds are needed, users should exercise caution when updating PyJWT and verify that their PyJWT implementation doesn't include algorithms with names '', 'HS25', 'HS2', 'HS', 'H', or ensure these algorithms are acceptable for their use case (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management