Skip to content
Fencer Vulns
high 7.5

CVE-2009-2940 json

PyGreSQL Might Be Vulnerable to Encoding-Based SQL Injection

published 2009-10-22 17 y ago modified 2026-06-16 4 mo ago also GHSA-xv6x-43gq-4hfj , PYSEC-2009-18 , EUVD-2022-5860

cvss
7.5
version 2.0, NVD
cisa kev
Not listed
not in CISA's catalog
epss
2.7%
EPSS 2.7% chance of exploitation in 30 days, percentile 86%
public exploits
0
none known

Summary

The pygresql module 3.8.1 and 4.0 for Python does not properly support the PQescapeStringConn function, which might allow remote attackers to leverage escaping issues involving multibyte character encodings.

Patch / fix

  • pypi pygresql 4.1
  • pygresql Debian 14, Debian 13, Debian 12 1:4.0-1

debian advisories DEBIAN-CVE-2009-2940

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2009-2940 updated cvss 5.4

PyGreSQL: Missing a function to call PQescapeStringConn()

  • Red Hat Enterprise Linux 6 PyGreSQL
    affected: no fix planned “Will not fix”
  • Red Hat Enterprise Linux 7 PyGreSQL
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

2.70% chance of exploitation in the next 30 days, higher than 86% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
NVD 2.0 7.5 AV:N/AC:L/Au:N/C:P/I:P/A:P

Affected packages

ecosystem package affected fixed in
pypi pygresql
<=3.8.1
>=4.0, <4.1
>=3.8.1, <=4.0
4.1

Classification

Weakness
  • CWE-89 Improper Neutralization of Special Elements used in an SQL Command

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.