REDHAT-BUG-2378689: SQL Injection

Published Jul 8, 2025
·
Updated

Missing error checking could result in SQL injection and missing error handling could lead to crashes due to null pointer dereferences.

This is related to https://www.postgresql.org/support/security/CVE-2025-1094/ that was reported to postgres. The reporter used php to showcase the problem.

While working on addressing the report, it was realised that PHP uses the escape functions in a way that does not allow for errors to be reported. Specifically the error parameters is not passed to PQescapeStringConn(), which therefore cannot report an error.

While postgres now tries to make sure that the escaped string will trigger errors on the server-side if the string is invalidly encoded, that still can be insufficient, depending on how the escaped values are used.

It was also noted that several calls to PQescapeIdentifier() do not check for the returned value being NULL, despite that being the documented way that PQescapeIdentifier() (and PQescapeLiteral()) to report errors. Seems like that could cause crashes or at least UB in some of the callsites.

Affected Software

2 affected components
PostgreSQL postgresql
PHP

Event History

Jul 8, 2025
Data Sourced
via Red Hat·05:34 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of REDHAT-BUG-2378689?

The severity of REDHAT-BUG-2378689 is high due to its potential for SQL injection and application crashes.

2

How do I fix REDHAT-BUG-2378689?

To fix REDHAT-BUG-2378689, ensure you have the latest updates applied to PostgreSQL and PHP that address the vulnerability.

3

What systems are affected by REDHAT-BUG-2378689?

REDHAT-BUG-2378689 affects systems running PostgreSQL and PHP without the necessary error handling and checks.

4

What attacks can exploit REDHAT-BUG-2378689?

Attackers can exploit REDHAT-BUG-2378689 via SQL injection attacks or by causing application crashes through null pointer dereference.

5

How can I check if I am vulnerable to REDHAT-BUG-2378689?

You can check for vulnerability to REDHAT-BUG-2378689 by reviewing your PostgreSQL and PHP versions against the latest security advisories.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203