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
    0.0
    high

    severity band, no base score published

    epss
    0.00%
    medium

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

    xyz score
    0.0
    medium

    CyberXYZ composite out of 10

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

    // 1 advisories

    GHSA-xv6x-43gq-4hfj

    HIGHCVE-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.escapestring() and pg.escapebytea() are still available, but applications will have to be adjusted to use the new pyobj.escapestring() and pyobj.escapebytea() 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-10-23 at 18:45 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.