Skip to content

CodeChecker has a buffer overflow in the log command

Moderate severity GitHub Reviewed Published Sep 22, 2025 in Ericsson/codechecker • Updated Oct 29, 2025

Package

pip codechecker (pip)

Affected versions

<= 6.26.1

Patched versions

6.26.2

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.

References

@bruntib bruntib published to Ericsson/codechecker Sep 22, 2025
Published to the GitHub Advisory Database Sep 22, 2025
Reviewed Sep 22, 2025
Published by the National Vulnerability Database Oct 28, 2025
Last updated Oct 29, 2025

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(3rd percentile)

Weaknesses

Stack-based Buffer Overflow

A stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function). Learn more on MITRE.

CVE ID

CVE-2025-40843

GHSA ID

GHSA-5xf2-f6ch-6p8r

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.