Intel

AIKIDO-2025-10493

github.com/uptrace/bun/driver/pgdriver is vulnerable to SQL Injection

SQL InjectionCVE-2024-44906

65

Medium Risk

This Affects:

GOgithub.com/uptrace/bun/driver/pgdriver
0.2.11 - 1.2.14
Fixed in 1.2.15

TL;DR

Affected versions of the package are vulnerable to SQL injection due to improper handling of negative numbers in the format function. When processing negative values, the vulnerable versions fail to prepend a space before the minus sign. As a result, the minus sign may be interpreted as part of a SQL comment sequence (e.g., --), potentially altering the structure or logic of the underlying SQL query. This flaw enables attackers to inject malicious SQL code, which can lead to unauthorized data access, data manipulation, or other unintended behavior within the database.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

github.com/uptrace/bun/driver/pgdriver is vulnerable to SQL Injection in versions 0.2.11 - 1.2.14.

How to fix this

Upgrade the github.com/uptrace/bun/driver/pgdriver library to the patch version.