CVE-2024-22414: Unchecked Db Fetchone Typeerror

Direct destructuring or unpacking of `fetchone()` results without checking for `None` can cause an unhandled TypeError if the query yields no results, leading to a Denial of Service. Ensure the record exists before unpacking it.

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Python
greprules fetch cve-2024-22414-unchecked-db-fetchone-typeerror --engine opengrep

Description

Direct destructuring or unpacking of `fetchone()` results without checking for `None` can cause an unhandled TypeError if the query yields no results, leading to a Denial of Service. Ensure the record exists before unpacking it.