GHSA-c4cm-r9fh-jgj9: Commonground api common Commonground-api-common Unexploitable Privilege Escalation Vulnerability
LOWGHSA-c4cm-r9fh-jgj9 is a LOW commonground-api-common unexploitable privilege escalation vulnerability (General Security Weakness) affecting Commonground api common libraries in the PyPI ecosystem. The issue involves commonground-api-common unexploitable privilege escalation in jwt authentication middleware. Remediation is available in the latest vendor maintenance releases.
GHSA-c4cm-r9fh-jgj9 at a Glance
How to Fix GHSA-c4cm-r9fh-jgj9
To remediate this vulnerability, upgrade all affected Commonground api common dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install commonground-api-common>=Latest secure release
pip install vng-api-common>=Latest secure release
pip install vng-api-common-utrecht>=Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show commonground-api-common
How to Check if You Are Affected
To determine whether your Python environment is affected by GHSA-c4cm-r9fh-jgj9, inspect your installed packages using pip:
pip show commonground-api-common
Analyze the terminal output to locate any version of Commonground api common in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The pip show commonground-api-common command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Commonground api common, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-c4cm-r9fh-jgj9 Affected Commonground api common Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
commonground-api-common
|
PyPI |
≤ 1.12.1
|
|
|
vng-api-common
|
PyPI |
≤ 2.0.5
|
|
|
vng-api-common-utrecht
|
PyPI |
≤ 1.3.2
|
|
References
Frequently Asked Questions
What is GHSA-c4cm-r9fh-jgj9?
Which Commonground api common versions are affected?
What version fixes GHSA-c4cm-r9fh-jgj9?
Is commonground-api-common affected?
Is vng-api-common affected?
What CWE is associated with GHSA-c4cm-r9fh-jgj9?
How can I check PyPI dependencies for GHSA-c4cm-r9fh-jgj9?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c4cm-r9fh-jgj9",
"modified" : "2024-02-09T17:04:47Z",
"published" : "2024-02-09T17:04:47Z",
"aliases" : [ ],
"summary" : "commonground-api-common unexploitable privilege escalation in JWT authentication middleware",
"details" : "### Impact\n\nThis is a privilege escalation vulnerability. The impact is negligible and entirely theoretical.\n\nA non-exploitable weakness was found in how the client-supplied JWTs are verified. Because an explicit allow-list\nof known algorithms is used in the PyJWT library, user-supplied (invalid) algorithms are rejected.\n\nIf this was not the case, then the client JWTs could be tampered with, resulting in privilege escalation which\nwould allow the attacker to perform any operation as any client (impersonation) without leaving a trace of\nthe real user/client.\n\n\n### Patches\n\nWill be fixed in 1.12.2\n\n### Workarounds\n\nNone 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.\n\n### Details\n\nThe 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.\n\nThe `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.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "commonground-api-common"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.12.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "vng-api-common"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "2.0.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "vng-api-common-utrecht"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.3.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/maykinmedia/commonground-api-common/security/advisories/GHSA-c4cm-r9fh-jgj9"
}, {
"type" : "WEB",
"url" : "https://github.com/maykinmedia/commonground-api-common/commit/20d9345a865338777839e8f02c21cd9d6f5a2cae"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2024-02-09T17:04:47Z",
"nvd_published_at" : null
}
}