CGA-rqqc-qwmr-qw72
SQL injection vulnerability in pgx (Go)

SQL injection No known exploit Fixable By Resolved Security

What is CGA-rqqc-qwmr-qw72 About?

This vulnerability is an SQL injection flaw triggered by an integer overflow when handling oversized messages. It allows attackers to execute arbitrary SQL commands if they can control the message size and cause it to exceed 4 GB. Exploitation is complex due to the specific conditions required to trigger the overflow.

Affected Software

  • github.com/jackc/pgx
    • <4.18.2
    • >5.0.0, <5.5.4
  • github.com/jackc/pgx/v4
    • <4.18.2
  • github.com/jackc/pgx/v5
    • >5.0.0, <5.5.4

Technical Details

The vulnerability stems from an integer overflow vulnerability in the calculation of message sizes. When a single query or bind message exceeds 4 GB, an integer overflow occurs during size calculation. This overflow can cause the large message to be fragmented and sent as multiple smaller messages. An attacker, by precisely controlling the input that causes this oversized message, can then manipulate these smaller fragmented messages to inject arbitrary SQL commands into the database backend, leading to SQL injection.

What is the Impact of CGA-rqqc-qwmr-qw72?

Successful exploitation may allow attackers to execute arbitrary SQL commands on the backend database, potentially leading to unauthorized data access, modification, or deletion, and potentially remote code execution on the database server.

What is the Exploitability of CGA-rqqc-qwmr-qw72?

Exploitation of this SQL injection vulnerability is complex, as it requires an attacker to generate a single query or bind message exceeding 4 GB in size to trigger an integer overflow. No specific authentication or privilege requirements are mentioned, implying it could potentially be exploited by any user who can send sufficiently large queries, making it a remote access vulnerability. The primary constraint is the ability to construct and deliver such an oversized message. Risk factors include applications that do not validate or restrict the size of user-provided input, allowing for exceptionally large query strings or bind parameters.

What are the Known Public Exploits?

PoC Author Link Commentary
No known exploits

What are the Available Fixes for CGA-rqqc-qwmr-qw72?

A Fix by Resolved Security Exists!

About the Fix from Resolved Security

None

Available Upgrade Options

  • github.com/jackc/pgx/v4
    • <4.18.2 → Upgrade to 4.18.2
  • github.com/jackc/pgx/v5
    • >5.0.0, <5.5.4 → Upgrade to 5.5.4
  • github.com/jackc/pgx
    • <4.18.2 → Upgrade to 4.18.2
  • github.com/jackc/pgx
    • >5.0.0, <5.5.4 → Upgrade to 5.5.4

Struggling with dependency upgrades?

See how Resolved Security's drop-in replacements make it simple.

Book a demo

Additional Resources

What are Similar Vulnerabilities to CGA-rqqc-qwmr-qw72?

Similar Vulnerabilities: CVE-2021-3653 , CVE-2023-37902 , CVE-2023-28687 , CVE-2022-24756 , CVE-2021-4204