Skip to content

← Public intelligence

Go package

github.com/jackc/pgx/v4

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

2 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. High, CVSS 8.1GoPublished

    pgx SQL Injection via Protocol Message Size Overflow

    CVE-2024-27304 · GHSA-mrww-27vc-gghv

    Affected
    • Go github.com/jackc/pgx/v4 < 4.18.2
    Fixed in
    4.18.2· Vendor fix available
    Issue
    Impact SQL injection can occur if an attacker can cause a single query or bind message to exceed 4 GB in size. An integer overflow in the calculated message size can cause the one large message to be sent as multiple messages under the attacker's control. Patches The problem is resolved in v4.18.2 and v5.5.4. Workarounds Reject user input large enough to cause a single query or bind message to exceed 4 GB in size.

    Recommended action: Upgrade to 4.18.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  2. High, CVSS 8.7GoPublished

    pgx SQL Injection via Line Comment Creation

    CVE-2024-27289 · GHSA-m7wr-2xf7-cm9p

    Affected
    • Go github.com/jackc/pgx/v4 < 4.18.2
    Fixed in
    4.18.2· Vendor fix available
    Issue
    Impact SQL injection can occur when all of the following conditions are met: 1. The non-default simple protocol is used. 2. A placeholder for a numeric value must be immediately preceded by a minus. 3. There must be a second placeholder for a string value after the first placeholder; both must be on the same line. 4. Both parameter values must be user-controlled. e.g. Simple mode must be enabled: Parameterized query: Parameter values: $1 = -42 $2 = "foo\n 1 AND 1=0 UNION SELECT FROM secrets; --" Resulting query after preparation: Patches The problem is resolved in v4.18.2. Workarounds Do not use the simple protocol or do not place a minus directly before a placeholder.

    Recommended action: Upgrade to 4.18.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →