Vulnerabilities in pkg:pypi/ctx
PACKAGEGHSA-67r3-h899-9w95 is a CRITICAL embedded malicious code vulnerability (General Security Weakness) affecting Ctx libraries in the PyPI ecosystem. The issue involves embedded malicious code in ctx. Remediation is available in the latest vendor maintenance releases.
pkg:pypi/ctx
Vulnerability advisories affecting package pkg:pypi/ctx. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-67r3-h899-9w95 | - | CRITICAL | Embedded Malicious Code in ctx |
| GHSA-4g82-3jcr-q52w | - | CRITICAL | Malware in ctx |
GHSA-67r3-h899-9w95 at a Glance
How to Fix GHSA-67r3-h899-9w95
To remediate this vulnerability, upgrade all affected Ctx 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 ctx>=Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show ctx
How to Check if You Are Affected
To determine whether your Python environment is affected by GHSA-67r3-h899-9w95, inspect your installed packages using pip:
pip show ctx
Analyze the terminal output to locate any version of Ctx 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 ctx 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 Ctx, 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-67r3-h899-9w95 Affected Ctx Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ctx
|
PyPI |
≥ 0.1.2-1
|
|
References
Frequently Asked Questions
What is GHSA-67r3-h899-9w95?
Which Ctx versions are affected?
What version fixes GHSA-67r3-h899-9w95?
Is ctx affected?
What CWE is associated with GHSA-67r3-h899-9w95?
How can I check PyPI dependencies for GHSA-67r3-h899-9w95?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-67r3-h899-9w95",
"modified" : "2022-06-02T15:46:06Z",
"published" : "2022-06-02T15:46:06Z",
"aliases" : [ ],
"summary" : "Embedded Malicious Code in ctx",
"details" : "The ctx hosted project on PyPI was taken over via user account compromise and replaced with a malicious project which contained runtime code which collected the content of os.environ.items() when instantiating Ctx objects.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "ctx"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.1.2-1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/ctx/PYSEC-2022-199.yaml"
}, {
"type" : "WEB",
"url" : "https://python-security.readthedocs.io/pypi-vuln/index-2022-05-24-ctx-domain-takeover.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-02T15:46:06Z",
"nvd_published_at" : null
}
}