CVE-2025-51823: Struct Field Strcpy Overflow

The application uses strcpy to write a variable string into a struct member. If the source string is excessively long, this leads to a stack- or heap-based buffer overflow, overwriting adjacent struct memory or metadata. Prefer using bounds-checking string functions like strncpy, strlcpy, or snprintf, explicitly bounded by the destination struct member's len

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Cβ
greprules fetch cve-2025-51823-struct-field-strcpy-overflow --engine opengrep

Description

The application uses strcpy to write a variable string into a struct member. If the source string is excessively long, this leads to a stack- or heap-based buffer overflow, overwriting adjacent struct memory or metadata. Prefer using bounds-checking string functions like strncpy, strlcpy, or snprintf, explicitly bounded by the destination struct member's len