BehaviorTree Stack-Based Buffer Overflow Vulnerability in Script Parser

Vulnerability

A stack-based buffer overflow vulnerability has been identified in BehaviorTree versions through 4.7.0. The issue arises in the 'ParseScript' function within 'src/script_parser.cpp', specifically in the Diagnostic Message Handler component. The vulnerability is caused by a fixed-size error buffer that cannot accommodate longer diagnostic messages, leading to an overflow. This issue can only be exploited locally.

Impact

Exploitation of this vulnerability causes a stack-based buffer overflow, which can lead to arbitrary code execution or a crash, depending on the context.

Reproduction

The vulnerability can be reproduced by compiling BehaviorTree with AddressSanitizer and UndefinedBehaviorSanitizer enabled. After building the application, the fuzzer can be run with a crafted input file that triggers the buffer overflow. The program will crash, and the AddressSanitizer will report the stack-buffer-overflow error, indicating that the vulnerability has been successfully exploited.

Remediation

Users are advised to update to BehaviorTree version 4.7.1 or later, where this vulnerability has been fixed.

Added: Sep 26, 2025, 12:26 PM
Updated: Sep 26, 2025, 2:45 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
10.0
exploitability
6.0
remediation
7.7
relevance
0.6
threat
6.4
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.