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.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| 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
- DSA-1911-1 pygresql - missing escape function Debian Security (DSA / DLA) · Mar 9, 2026