Vulnerabilities in pkg:golang/github.com/go-pg/pg

PACKAGE
Advisory Identifier: GHSA-6xp3-p59p-q4fj
Advisory Summary

CVE-2024-44905 is a MODERATE (CVSS 6.5) sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Github.com/go pg/pg/v10 libraries in the Go ecosystem. The issue involves go-pg sql injection vulnerability via the component /types/append_value.go. Remediation is available by upgrading affected packages to version 10.15.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/go-pg/pg

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/go-pg/pg. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-6xp3-p59p-q4fj CVE-2024-44905 MODERATE go-pg SQL injection vulnerability via the component /types/append_value.go

CVE-2024-44905 at a Glance

CVE Identifier CVE-2024-44905
GHSA Identifier GHSA-6xp3-p59p-q4fj
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Github.com/go pg/pg/v10
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2024-44905

To remediate this vulnerability, upgrade all affected Github.com/go pg/pg/v10 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/go-pg/pg/v10 fixed: 10.15.0
Upgrade github.com/go-pg/pg/v10 to 10.15.0
github.com/go-pg/pg/v9 fixed: Latest secure release
Upgrade github.com/go-pg/pg/v9 to Latest secure release
github.com/go-pg/pg fixed: Latest secure release
Upgrade github.com/go-pg/pg to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/go-pg/pg/v10

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-44905, inspect your project dependencies for Github.com/go pg/pg/v10:

inspect dependencies for github.com/go-pg/pg/v10

Analyze the terminal output to locate any version of Github.com/go pg/pg/v10 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 10.15.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Github.com/go pg/pg/v10, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

go-pg pg v10.13.0 was discovered to contain a SQL injection vulnerability via the component /types/append_value.go.

CVE-2024-44905 Affected Github.com/go pg/pg/v10 Versions

3 component(s)
Fixed Versions:
10.15.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/go-pg/pg/v10
Go
< 10.15.0
10.15.0
github.com/go-pg/pg/v9
Go
≤ 9.2.1
github.com/go-pg/pg
Go
≤ 8.0.7

References

Frequently Asked Questions

What is CVE-2024-44905?
CVE-2024-44905 is a security vulnerability in Github.com/go pg/pg/v10 involving go-pg SQL injection vulnerability via the component /types/append_value.go under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Github.com/go pg/pg/v10 versions are affected?
Affected versions include releases prior to 10.15.0 across affected packages: github.com/go-pg/pg/v10, github.com/go-pg/pg/v9, github.com/go-pg/pg.
What version fixes CVE-2024-44905?
Upgrading to 10.15.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/go-pg/pg/v10 affected?
Yes, github.com/go-pg/pg/v10 is affected in releases prior to 10.15.0. Upgrade your dependency to 10.15.0 or later.
Is github.com/go-pg/pg/v9 affected?
Yes, github.com/go-pg/pg/v9 is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2024-44905?
CVE-2024-44905 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2024-44905?
CVE-2024-44905 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check Go dependencies for CVE-2024-44905?
Run the dependency tree command: 'inspect dependencies for github.com/go-pg/pg/v10'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-6xp3-p59p-q4fj",
  "modified" : "2025-12-20T03:13:15Z",
  "published" : "2025-06-12T18:31:47Z",
  "aliases" : [ "CVE-2024-44905" ],
  "summary" : "go-pg SQL injection vulnerability via the component /types/append_value.go",
  "details" : "go-pg pg v10.13.0 was discovered to contain a SQL injection vulnerability via the component /types/append_value.go.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/go-pg/pg/v10"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "10.15.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/go-pg/pg/v9"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "9.2.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/go-pg/pg"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "8.0.7"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-44905"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/go-pg/pg/commit/eff50a43724e52347559687a6945c116afbb41c1"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-6xp3-p59p-q4fj"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/go-pg/pg"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/go-pg/pg/blob/30e7053c6cacdd44d06cf2b92183b49188b7c922/types/append_value.go#L151"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/go-pg/pg/releases/tag/v10.15.0"
  }, {
    "type" : "WEB",
    "url" : "https://media.defcon.org/DEF%20CON%2032/DEF%20CON%2032%20presentations/DEF%20CON%2032%20-%20Paul%20Gerste%20-%20SQL%20Injection%20Isn%27t%20Dead%20Smuggling%20Queries%20at%20the%20Protocol%20Level.pdf"
  }, {
    "type" : "WEB",
    "url" : "https://www.sonarsource.com/blog/double-dash-double-trouble-a-subtle-sql-injection-flaw"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-06-17T21:56:01Z",
    "nvd_published_at" : "2025-06-12T16:15:22Z"
  }
}