# CVE-2024-27289: GO-2024-2605 - SQL injection in github.com/jackc/pgx/v4

Source: https://junglewise.ai/threats/cve-2024-27289-pgx-sql-injection-via-line-comment-creation  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2024-03-11  
License: CC BY 4.0 with a link back

CVE-2024-27289 · Severity: low · CVSS 3.1 · Published 2024-03-11

SQL injection in github.com/jackc/pgx/v4

Technologies: [github.com/jackc/pgx (Go)](https://junglewise.ai/threats/technologies/github-com-jackc-pgx), [github.com/jackc/pgx/v4 (Go)](https://junglewise.ai/threats/technologies/github-com-jackc-pgx-v4). Vendors: [Go](https://junglewise.ai/threats/vendors/go).

## Quick answers

**Is CVE-2024-27289 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2024-27289 being exploited in the wild.

**How severe is CVE-2024-27289?** Low severity, with a CVSS score of 3.1, published 11 March 2024.

**Which products and versions are affected?** github.com/jackc/pgx (Go) SEMVER:introduced=0, SEMVER:introduced=0,fixed=4.18.2; github.com/jackc/pgx/v4 (Go) SEMVER:introduced=0,fixed=4.18.2.

**Is there a fix for CVE-2024-27289?** Yes. github.com/jackc/pgx (Go): upgrade to 4.18.2 or later; github.com/jackc/pgx/v4 (Go): upgrade to 4.18.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2024-27289?** Check whether you run github.com/jackc/pgx (Go) or github.com/jackc/pgx/v4 (Go) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- github.com/jackc/pgx (Go): upgrade to 4.18.2 or later

  ```sh
  go get github.com/jackc/pgx@v4.18.2
  ```

- github.com/jackc/pgx/v4 (Go): upgrade to 4.18.2 or later

  ```sh
  go get github.com/jackc/pgx/v4@v4.18.2
  ```


## Affected products

- github.com/jackc/pgx (Go) SEMVER:introduced=0, SEMVER:introduced=0,fixed=4.18.2
- github.com/jackc/pgx/v4 (Go) SEMVER:introduced=0,fixed=4.18.2

## Identifiers

- CVE-2024-27289
- GHSA-m7wr-2xf7-cm9p
- GO-2024-2605

## Related threats

- [jackc pgx SQL injection in simple protocol sanitizer](https://junglewise.ai/threats/cve-2026-41889-jackc-pgx-sql-injection-in-simple-protocol-sanitizer)
- [GO-2024-2606 - SQL injection in github.com/jackc/pgproto3 and github.com/jackc/pgx](https://junglewise.ai/threats/cve-2024-27304-pgproto3-sql-injection-via-protocol-message-size-overflow)
