The WriteBind() method in src/Npgsql/Internal/NpgsqlConnector.FrontendMessages.cs uses int variables to store the message length and the sum of parameter lengths. Both variables overflow when the sum of parameter lengths becomes too large.
This causes Npgsql to write a message size that is too small when constructing a Postgres protocol message to send it over the network to the database. When parsing the message, the database will only read a small number of bytes and treat any following bytes as new messages while they belong to the old message.
Attackers can abuse this to inject arbitrary Postgres protocol messages into the connection, leading to the execution of arbitrary SQL statements on the application's behalf.
Impact
Attackers can issue arbitrary SQL statements to the database on behalf of the application. The final impact depends on the application that uses Npgsql, the data it stores in Postgres, etc.
Release Notes
npgsql/npgsql (Npgsql)
### [`v4.1.13`](https://togithub.com/npgsql/npgsql/releases/tag/v4.1.13)
This version contains a high-severity security patch for [CVE-2024-32655](https://togithub.com/npgsql/npgsql/security/advisories/GHSA-x9vc-6hfv-hg8c) everyone is advised to upgrade.
Thanks to [@paul-gerste-sonarsource](https://togithub.com/paul-gerste-sonarsource) for reporting the vulnerability.
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, check this box
This PR contains the following updates:
4.1.12
->4.1.13
GitHub Vulnerability Alerts
CVE-2024-32655
Summary
The
WriteBind()
method insrc/Npgsql/Internal/NpgsqlConnector.FrontendMessages.cs
usesint
variables to store the message length and the sum of parameter lengths. Both variables overflow when the sum of parameter lengths becomes too large.This causes Npgsql to write a message size that is too small when constructing a Postgres protocol message to send it over the network to the database. When parsing the message, the database will only read a small number of bytes and treat any following bytes as new messages while they belong to the old message.
Attackers can abuse this to inject arbitrary Postgres protocol messages into the connection, leading to the execution of arbitrary SQL statements on the application's behalf.
Impact
Attackers can issue arbitrary SQL statements to the database on behalf of the application. The final impact depends on the application that uses Npgsql, the data it stores in Postgres, etc.
Release Notes
npgsql/npgsql (Npgsql)
### [`v4.1.13`](https://togithub.com/npgsql/npgsql/releases/tag/v4.1.13) This version contains a high-severity security patch for [CVE-2024-32655](https://togithub.com/npgsql/npgsql/security/advisories/GHSA-x9vc-6hfv-hg8c) everyone is advised to upgrade. Thanks to [@paul-gerste-sonarsource](https://togithub.com/paul-gerste-sonarsource) for reporting the vulnerability.Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.