Skip to content
OpenAdvisories
High CVE-2009-2940 EUVD-2022-5860GHSA-xv6x-43gq-4hfjPYSEC-2009-18

PyGreSQL Might Be Vulnerable to Encoding-Based SQL Injection

Published Oct 22, 2009 · Updated Aug 7, 2024 · Assigned by mitre

Description

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.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 pygresql 1:4.0-1 —
Debian 13 pygresql 1:4.0-1 —
Debian 12 pygresql 1:4.0-1 —
Debian 5.0 pygresql 1:3.8.1-3+lenny1 DSA-1911-1
Debian 4.0 pygresql 1:3.8.1-1etch2 DSA-1911-1

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI pygresql <= 3.8.1 — GHSA-xv6x-43gq-4hfj
PyPI pygresql >= 4.0, < 4.1 4.1 GHSA-xv6x-43gq-4hfj
PyPI pygresql >= 3.8.1, <= 4.0 — PYSEC-2009-18

Advisories 1

References