pgx is a PostgreSQL driver and toolkit for Go. Prior to version 4.18.2, SQL injection can occur when all of the following conditions are met: the non-default simple protocol is used; a placeholder for...
Summary
pgx is a PostgreSQL driver and toolkit for Go. Prior to version 4.18.2, SQL injection can occur when all of the following conditions are met: the non-default simple protocol is used; a placeholder for a numeric value must be immediately preceded by a minus; there must be a second placeholder for a s...
Original description
The description as published by the source.
pgx is a PostgreSQL driver and toolkit for Go. Prior to version 4.18.2, SQL injection can occur when all of the following conditions are met: the non-default simple protocol is used; a placeholder for a numeric value must be immediately preceded by a minus; there must be a second placeholder for a string value after the first placeholder; both must be on the same line; and both parameter values must be user-controlled. The problem is resolved in v4.18.2. As a workaround, do not use the simple protocol or do not place a minus directly before a placeholder.
Source: NIST National Vulnerability Database NVD
AI summary
Written by an external AI model and may contain mistakes. Check the original description and references below before acting on it.
pgxはGo用のPostgreSQLドライバーで、バージョン4.18.2より前ではSQLインジェクションの脆弱性が存在します。これは、特定の条件下で非デフォルトのシンプルプロトコルを使用した場合に発生します。問題はバージョン4.18.2で修正されています。ワークアラウンドとして、シンプルプロトコルを使わないか、プレースホルダーの前にマイナスを置かないようにします。
pgxにおけるSQLインジェクションの脆弱性
pgxのバージョン4.18.2未満
Go言語で使用されるPostgreSQLドライバーにおいて、ユーザー制御可能なパラメータを通じてSQLインジェクションが可能。CVSSスコアは8.1で、高い重要性を持つ。
バージョン4.18.2にアップデートして、脆弱性を修正する。
シンプルプロトコルを使用しないか、プレースホルダーの前にマイナスを置かない。
pgxを使用しているコードを確認し、該当バージョンを使っていないかチェックする。
Fix status by distribution
Fixed packages published by each distribution for this CVE
- Debian DEBIAN-CVE-2024-27289 golang-github-jackc-pgx
- Ubuntu UBUNTU-CVE-2024-27289 golang-github-jackc-pgx
References
- advisory sonarsource.com
- patch github.com
- patch github.com