CVE-2009-2940
HIGH 7.5CVSS 2.0PyGreSQL Might Be Vulnerable to Encoding-Based SQL Injection
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.
- Published
- 22 Oct 2009
- Last modified
- 16 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-89
- Also known as
- GHSA-xv6x-43gq-4hfjPYSEC-2009-18
- Sources
- NVDJSONOSV GHSA-xv6x-43gq-4hfjJSONOSV PYSEC-2009-18JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | HIGH 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | pygresql | pygresqlcpe:2.3:a:pygresql:pygresql:3.8.1:*:*:*:*:*:*:* |
= 3.8.1 | |
| NVD | pygresql | pygresqlcpe:2.3:a:pygresql:pygresql:4.0:*:*:*:*:*:*:* |
= 4.0 | |
| OSV | PyPI | pygresql | <= 3.8.1 | |
| OSV | PyPI | pygresql | >= 4.0, < 4.1 | 4.1 |
| OSV | PyPI | pygresql | >= 3.8.1, <= 4.0 |
References
- http://secunia.com/advisories/37046 · Vendor Advisory, ADVISORY
- http://secunia.com/advisories/37654 · ADVISORY
- http://ubuntu.com/usn/usn-870-1 · WEB
- http://www.debian.org/security/2009/dsa-1911 · WEB, ADVISORY
- http://www.osvdb.org/59028 · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2009-2940 · ADVISORY
- https://github.com/PyGreSQL/PyGreSQL/commit/8e19320b130946eed6f043297e3e4e005a523612 · WEB
- https://github.com/PyGreSQL/PyGreSQL/commit/f7237d773e6f4d5a7da3d99bb6bc5062bd07935e · WEB
- https://github.com/PyGreSQL/PyGreSQL · PACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/pygresql/PYSEC-2009-18.yaml · WEB
- https://github.com/advisories/GHSA-xv6x-43gq-4hfj · ADVISORY
History
- 25 Nov 2026 20:15 UTC · NVD: first stored (published 22 Oct 2009)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 22 Oct 2009)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 2 May 2022)