---
id: CVE-2024-9774
aliases:
  - GHSA-pq9p-pc3p-9hm4
  - PYSEC-2026-1855
title: python-sql SQL injection vulnerability
summary: python-sql SQL injection vulnerability
severity: medium
cvss: 6.5
cvssVector: 'CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N'
vendor: python-sql
product: python-sql
ecosystem: pip
affected:
  - python-sql < 1.5.2
patched:
  - python-sql 1.5.2
published: '2024-12-27'
updated: '2026-07-07'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-pq9p-pc3p-9hm4'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2024-9774'
  - url: 'https://access.redhat.com/security/cve/CVE-2024-9774'
  - url: 'https://bugs.tryton.org/python-sql/93'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2332734'
  - url: 'https://discuss.tryton.org/t/security-release-for-issue-93/7889'
  - url: 'https://discuss.tryton.org/t/security-release-for-issue-93/7889/3'
  - url: >-
      https://foss.heptapod.net/tryton/python-sql/-/commit/f20551bbb8b3b4c4dd0a2c3d36f377bff6f2f349
  - url: 'https://github.com/tryton/python-sql'
  - url: 'https://lists.debian.org/debian-lts-announce/2024/10/msg00023.html'
tags:
  - osv
  - pip
epss: 0.00696
epssPercentile: 0.51615
ingestedAt: '2026-07-08T18:25:51.825Z'
---

## Overview

A vulnerability was found in python-sql where unary operators do not escape non-Expression (like `And` and `Or`) which makes any system exposing those vulnerable to an SQL injection attack.

## Affected packages

- `python-sql < 1.5.2`

## Remediation

Upgrade to a patched release:

- `python-sql 1.5.2`
