CVE-2024-54141: phpMyFAQ Database Credential Exposure Due to Connection Failure

thorsten/phpmyfaq Updated 02 Oct 2025

Summary

06/12/2024
Yes i
High
8.6

CVE-2024-54141: Exposure of database (ie postgreSQL) server's credential when connection to DB fails. Affects thorsten/phpmyfaq versions < 4.0.0. Fixed in 4.0.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

phpMyFAQ is an open-source FAQ management system designed to help users create and manage FAQs for their applications or websites. It supports various database systems, including PostgreSQL, and is widely used for its ease of use and flexibility. However, it has a vulnerability that exposes sensitive database credentials when the application fails to connect to the database server, potentially allowing unauthorized access to the database.

Vulnerability Detail

The vulnerability arises when phpMyFAQ attempts to connect to a PostgreSQL database server that is unavailable. In such cases, the application generates an error message that includes sensitive database credentials. This exposure occurs in the Installer.php file, specifically at line 694, where the connection attempt is made. If the database server is down or unreachable, the error message reveals the database username and password, which can be exploited by attackers to gain unauthorized access to the database. The severity of this vulnerability is rated high, with a CVSS score of 8.6, indicating a significant risk to the security of the database and the application.

How To Fix

Minimum fixed version

4.0.0

This is the first release that contains the fix.

composer require thorsten/phpmyfaq:4.0.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can modify the error handling in the phpMyFAQ code to suppress detailed error messages that include sensitive information. This can be done by wrapping the connection code in a try-catch block and logging the error instead of displaying it to the user. For example:

try {

    $this->conn = pg_connect($connection_string);
} catch (Exception $e) {
    error_log('Database connection failed: ' . $e->getMessage());
    // Display a generic error message to the user
echo 'Database connection failed. Please try again later.';
}

Conclusion

In summary, CVE-2024-54141 is a significant vulnerability in phpMyFAQ that can lead to the exposure of sensitive database credentials. It is crucial for users of phpMyFAQ to update to the latest version to protect their applications from potential attacks. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for thorsten/phpmyfaq →

Share this vulnerability

FAQ

CVE-2024-54141 is a vulnerability in phpMyFAQ that exposes sensitive database credentials when the application fails to connect to the PostgreSQL database server.

If your application uses phpMyFAQ and is affected by this vulnerability, attackers could gain access to your database by exploiting the exposed credentials.

You should update your phpMyFAQ installation to version 4.0.0 or later to mitigate the risk associated with this vulnerability.

Yes, you can use Vulert, which monitors open-source vulnerabilities in real-time. You can check if your application is affected by this vulnerability using the Vulert playground without any signup.

The CVSS score of this vulnerability is 8.6, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for thorsten/phpmyfaq.

How To Fix

Minimum fixed version

4.0.0

This is the first release that contains the fix.

composer require thorsten/phpmyfaq:4.0.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback