<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://vulnerability.circl.lu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-09-28T19:04:35.612661+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@circl.lu</email>
  </author>
  <link href="https://vulnerability.circl.lu" rel="alternate"/>
  <generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
  <subtitle>Contains only the most 10 recent entries.</subtitle>
  <entry>
    <id>https://vulnerability.circl.lu/vuln/ghsa-m7wr-2xf7-cm9p</id>
    <title>GHSA-m7wr-2xf7-cm9p — pgx SQL Injection via Line Comment Creation</title>
    <updated>2026-09-28T19:04:35.633974+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> Go: github.com/jackc/pgx, Go: github.com/jackc/pgx/v4</p>
<p>### Impact</p>
<p>SQL injection can occur when all of the following conditions are met:</p>
<p>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.</p>
<p>e.g.</p>
<p>Simple mode must be enabled:</p>
<p>```go
// connection string includes "prefer_simple_protocol=true"
// or
// directly enabled in code
config.ConnConfig.PreferSimpleProtocol = true
```</p>
<p>Parameterized query:</p>
<p>```sql
SELECT * FROM example WHERE result=-$1 OR name=$2;
```</p>
<p>Parameter values:</p>
<p>`$1` =&gt; `-42`
`$2` =&gt; `"foo\n 1 AND 1=0 UNION SELECT * FROM secrets; --"`</p>
<p>Resulting query after preparation:</p>
<p>```sql
SELECT * FROM example WHERE result=--42 OR name= 'foo
1 AND 1=0 UNION SELECT * FROM secrets; --';
```</p>
<p>### Patches</p>
<p>The problem is resolved in v4.18.2.</p>
<p>### Workarounds</p>
<p>Do not use the simple protocol or do not place a minus directly before a placeholder.</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/ghsa-m7wr-2xf7-cm9p"/>
  </entry>
</feed>
