{"id":"CVE-2026-44219","aliases":["GHSA-xw8c-rrvx-f7xq","PYSEC-2026-2410"],"title":"ciguard: SCA HTTP client reads response body without size cap","summary":"ciguard: SCA HTTP client reads response body without size cap","severity":"low","cvss":3.7,"cvssVector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","vendor":"ciguard","product":"ciguard","ecosystem":"pip","affected":["ciguard >= 0.6.0, < 0.8.2"],"patched":["ciguard 0.8.2"],"published":"2026-05-05","updated":"2026-07-13","source":"OSV","sourceUrl":"https://osv.dev/vulnerability/GHSA-xw8c-rrvx-f7xq","references":[{"url":"https://github.com/Jo-Jo98/ciguard/security/advisories/GHSA-xw8c-rrvx-f7xq"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44219"},{"url":"https://github.com/Jo-Jo98/ciguard"},{"url":"https://github.com/Jo-Jo98/ciguard/releases/tag/v0.8.2"},{"url":"https://github.com/Jo-Jo98/ciguard/releases/tag/v0.8.3"}],"tags":["osv","pip"],"epss":0.00307,"epssPercentile":0.20959,"ingestedAt":"2026-07-13T18:58:05.512Z","slug":"CVE-2026-44219","body":"## Overview\n\n## Summary\n\nBoth SCA HTTP clients (`src/ciguard/analyzer/sca/osv.py` and `src/ciguard/analyzer/sca/endoflife.py`) call `payload = json.loads(resp.read().decode('utf-8'))` without a maximum-bytes cap. A hostile or compromised endoflife.date / OSV.dev (or a successful TLS MITM) could return a multi-GB response, exhausting the ciguard process's memory.\n\n## Threat scenario\n\nciguard process memory exhaustion → OOM kill or system swap thrash. Realistic when ciguard runs in CI with a limited memory budget (typical: 4-8 GB). No data integrity or confidentiality impact.\n\n**Realism caveat:** both URLs are hardcoded HTTPS, so this is a low-realism threat (HTTPS prevents MITM unless the attacker controls a trusted CA or hijacks DNS in a way that doesn't trigger cert validation). The unbounded read is structural defence-in-depth, not a directly exploitable bug today.\n\n## Patch\n\n- New `MAX_RESPONSE_BYTES = 5 * 1024 * 1024` (5 MB) constant in both modules.\n- `body = resp.read(MAX_RESPONSE_BYTES + 1)` with overflow check returns `None` (caller falls back to stale cache).\n- 3 regression tests in `tests/test_sca_rules.py::TestSCAResponseSizeCap`.\n\n## Discovery\n\nFound during ciguard's first self-conducted pentest cycle, 2026-04-26.\n\n## CVSS Scoring\n\n- CVSS v3.1: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L` — 3.7 (Low)\n- CVSS v4.0: `CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N` — first.org calc 3.1 (Low); GitHub's calc 6.3 (Medium). Vector is correct — choosing v3.1 as the structured score keeps the consistent Low rating across consumers.\n\n## Reproduction\n\nMonkey-patch `urllib.request.urlopen` to return a fake 50 MB response; observe memory growth before/after the call. Pre-fix: process memory grows by ~50 MB. Post-fix: `_fetch` returns `None`, memory growth bounded to MAX_RESPONSE_BYTES.\n\n## References\n\n- Fix released in [v0.8.2](https://github.com/Jo-Jo98/ciguard/releases/tag/v0.8.2)\n- CI regression gate added in [v0.8.3](https://github.com/Jo-Jo98/ciguard/releases/tag/v0.8.3)\n- https://www.cve.org/CVERecord?id=CVE-2026-44219\n\n## Affected packages\n\n- `ciguard >= 0.6.0, < 0.8.2`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `ciguard 0.8.2`","depth":"sunlit","depthScore":20,"depthScoreParts":{"impact":20.4,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}