{"id":"GHSA-4g82-3jcr-q52w","aliases":["GHSA-4g82-3jcr-q52w"],"related":[],"kind":"vulnerability","state":"published","title":"Malware in ctx","summary":"The `ctx` hosted project on [PyPI](https://pypi.org/project/ctx/) was taken over via user account compromise and replaced with a malicious project which contained runtime code that collected the content of `os.environ.items()` when instantiating `Ctx` objects. The captured environment variables were sent as a base64 encoded query parameter to a heroku application running at `https://anti-theft-web.herokuapp.com`.\n\nIf you installed the package between May 14, 2022 and May 24, 2022, and your environment variables contain sensitive data like passwords and API keys (like `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`), we advise you to rotate your passwords and keys, then perform an audit to determine if they were exploited.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"The `ctx` hosted project on [PyPI](https://pypi.org/project/ctx/) was taken over via user account compromise and replaced with a malicious project which contained runtime code that collected the content of `os.environ.items()` when instantiating `Ctx` objects. The captured environment variables were sent as a base64 encoded query parameter to a heroku application running at `https://anti-theft-web.herokuapp.com`.\n\nIf you installed the package between May 14, 2022 and May 24, 2022, and your environment variables contain sensitive data like passwords and API keys (like `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`), we advise you to rotate your passwords and keys, then perform an audit to determine if they were exploited.","format":"markdown","source":"ghsa"}],"published":"2022-05-25T23:09:55.000Z","modified":"2022-05-25T23:09:55.000Z","severity":{"scorer":"GitHub","scheme":"rating","rating":"CRITICAL"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"CRITICAL"}],"cwes":["CWE-912"],"affected":[{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"0.1.4"}],"ecosystem":"PyPI","package":"ctx","purl":"pkg:pypi/ctx","source":"ghsa"}],"references":[{"url":"https://github.com/figlief/ctx","tags":["package"],"sources":["ghsa"]},{"url":"https://isc.sans.edu/forums/diary/ctx+Python+Library+Updated+with+Extra+Features/28678","tags":["web"],"sources":["ghsa"]},{"url":"https://portswigger.net/daily-swig/malicious-python-library-ctx-removed-from-pypi-repo","tags":["web"],"sources":["ghsa"]},{"url":"https://python-security.readthedocs.io/pypi-vuln/index-2022-05-24-ctx-domain-takeover.html","tags":["web"],"sources":["ghsa"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4g82-3jcr-q52w","url":"https://github.com/advisories/GHSA-4g82-3jcr-q52w","licence":"CC-BY-4.0","modified":"2022-05-25T23:09:55.000Z"}],"updatedAt":"2026-11-25T22:56:33.896Z"}