{"id":"CVE-2025-40843","aliases":["GHSA-5xf2-f6ch-6p8r","PYSEC-2025-100"],"url":"https://o3.security/vulnerability/CVE-2025-40843","summary":"Buffer overflow in CodeChecker log command","details":"### Summary\nCodeChecker versions up to 6.26.1 contain a buffer overflow vulnerability in the internal `ldlogger` library, which is executed by the `CodeChecker log` command.\n\n### Details\nUnsafe usage of `strcpy()` function in the internal `ldlogger` library allows attackers to trigger a buffer overflow by supplying crafted inputs from the command line. Specifically, the destination buffer is stack-allocated with a fixed size of 4096 bytes, while `strcpy()` is called without any length checks, enabling an attacker to overrun the buffer.\n\n### PoC\nExample script is included below to illustrate how this vulnerability can be exploited.\n```bash\n#!/bin/bash\n\nexport CC_LOGGER_DEF_DIRS=1; \npayload=''; for i in $(seq 1 4090); do payload+='A'; done\n\nCodeChecker log -b \"/very/long/path/to/$payload/gcc a.c\" -o compilation.json\n```\n\n### Impact\nAny environment where the vulnerable `CodeChecker log` command is executed with untrusted user input is affected by this vulnerability.","published":"2025-10-28T18:49:49.516Z","modified":"2026-08-12T03:51:45.676321070Z","cvss":{"score":5.9,"severity":"MEDIUM","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"PyPI","name":"codechecker","fixedVersion":"6.26.2"}],"fix":{"url":"https://github.com/Ericsson/codechecker/commit/4122eb1b43d00c880e4f0747d2ca0a674feb7a50","label":"Ericsson/codechecker@4122eb1"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40843.json"},{"type":"ADVISORY","url":"https://github.com/Ericsson/codechecker/security/advisories/GHSA-5xf2-f6ch-6p8r"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-40843"},{"type":"WEB","url":"https://github.com/Ericsson/codechecker/commit/4122eb1b43d00c880e4f0747d2ca0a674feb7a50"},{"type":"PACKAGE","url":"https://github.com/Ericsson/codechecker"},{"type":"WEB","url":"https://github.com/pypa/advisory-database/tree/main/vulns/codechecker/PYSEC-2025-100.yaml"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:45.676321070Z"}}