pypi package report

Is pygresql safe?

1 known vulnerability, worst severity HIGH.

// reach

0 direct dependencies

none carry a known advisory

    2 packages depend on it

    an advisory here reaches each of them

    Create a free accountfor every dependency path, dependent and what to upgrade
    // ai model usage

    No published models are known to use this package.


    cvss
    7.5
    high

    severity band, no base score published

    epss
    2.7%
    medium

    chance of exploitation in 30 days, 86th percentile of all CVEs

    xyz score
    4.0
    medium

    CyberXYZ composite out of 10

    fig. 01 — GHSA-xv6x-43gq-4hfj, the advisory selected below

    // 1 advisories

    GHSA-xv6x-43gq-4hfj

    HIGHGitHub ratingCVE-2009-2940

    PyGreSQL 3.8 did not use PostgreSQL’s safe string and bytea functions in its own escaping functions. As a result, applications written to use PyGreSQL’s escaping functions are vulnerable to SQL injections when processing certain multi-byte character sequences. Because the safe functions require a database connection, to maintain backwards compatibility, pg.escape_string() and pg.escape_bytea() are still available, but applications will have to be adjusted to use the new pyobj.escape_string() and pyobj.escape_bytea() functions. For example, code containing:

    import pg
    connection = pg.connect(...)
    escaped = pg.escape_string(untrusted_input)

    should be adjusted to use:

    import pg
    connection = pg.connect(...)
    escaped = connection.escape_string(untrusted_input)

    Checked 2026-11-09 at 05:54 UTC. The most recent advisory here was published 2022-05-02. Updated continuously from NVD, GHSA, OSV and CNA feeds.

    Think a verdict here is wrong? Tell us — we respond within 2 business days.