CVE-2024-23829: Python Split Empty Index Access

The application splits a string using a delimiter and accesses the first or last character (e.g., `[0]` or `[-1]`) of the resulting element without checking if it is non-empty. If the input string begins with the delimiter, the first element will be an empty string, leading to an `IndexError`. This can cause unhandled exceptions and Denial of Service (DoS) w

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Python
greprules fetch cve-2024-23829-python-split-empty-index-access --engine opengrep

Description

The application splits a string using a delimiter and accesses the first or last character (e.g., `[0]` or `[-1]`) of the resulting element without checking if it is non-empty. If the input string begins with the delimiter, the first element will be an empty string, leading to an `IndexError`. This can cause unhandled exceptions and Denial of Service (DoS) w