CVE-2025-28101: Unchecked Fetchone Result

A database query result from `fetchone()` is used without checking if it is `None`. If no rows are returned, `fetchone()` results in `None`, which will cause a `TypeError` when subscripted or checked for membership. Validate the result is not `None` before use.

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Python
greprules fetch cve-2025-28101-unchecked-fetchone-result --engine opengrep

Description

A database query result from `fetchone()` is used without checking if it is `None`. If no rows are returned, `fetchone()` results in `None`, which will cause a `TypeError` when subscripted or checked for membership. Validate the result is not `None` before use.