Skip to content

CVE-2024-44905: go-pg SQL injection vulnerability via the component /types/append_value.go #2032

@ramgopalk97

Description

@ramgopalk97

Currently go-pg/pg package contains a SQL injection vulnerability in the component /types/append_value.go.

return strconv.AppendInt(b, v.Int(), 10)

The vulnerability allows an attacker to inject SQL queries by manipulating line comments in PostgreSQL. When running in simple query mode, the library incorrectly handles parameter values that can create SQL line comments (--), potentially allowing syntax modification of the original query.

More details: https://www.sonarsource.com/blog/double-dash-double-trouble-a-subtle-sql-injection-flaw/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions