BUG #18817: Security Bug Report: Plaintext Password Exposure in Logs

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: bkindrajeeth(at)gmail(dot)com
Subject: BUG #18817: Security Bug Report: Plaintext Password Exposure in Logs
Date: 2025-02-18 08:21:47
Message-ID: 18817-771682052a364bfe@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 18817
Logged by: Indrajeet Deshmukh
Email address: bkindrajeeth(at)gmail(dot)com
PostgreSQL version: 15.0
Operating system: Linux
Description:

Namaste Team,

During the integration of PostgreSQL Database v15 logs into a SIEM
solution,I observed that user passwords are logged in plaintext when a user
is created using the database command. This poses a serious security risk as
credentials could be exposed to unauthorized users who have access to the
logs.

Vendor: PostgreSQL
Product: PostgreSQL Database
Version: 15
Severity: High
Issue Type: Security Vulnerability

Steps to Reproduce:
Open the PostgreSQL Database CLI or execute the command via a script.
Run the following command to create a new user:

CREATE USER indrajeet WITH PASSWORD 'indrajeet'

Check the database logs (/var/lib/pgsql/data/log). Below is the JSON log
generated when I used indrajeet as user name and indrajeet as password.

{"timestamp":"2025-02-18 08:11:38.557
UTC","user":"postgres","dbname":"postgres","pid":6069,"remote_host":"ip-100-66-2-217.ec2.internal","remote_port":53964,"session_id":"67b44074.17b5","line_num":4,"ps":"idle","session_start":"2025-02-18
08:10:28
UTC","vxid":"4/29","txid":0,"error_severity":"LOG","message":"statement:
CREATE USER indrajeet WITH PASSWORD
'indrajeet';","application_name":"psql","backend_type":"client
backend","query_id":0}

Expected Behavior: The password should be masked or excluded from logs to
prevent exposure.

Security Impact:
Confidentiality Violation: Anyone with access to logs can view user
passwords.
Risk of Credential Theft: Attackers or unauthorized users can leverage
exposed credentials for privilege escalation or lateral movement.
Compliance Issues: This may violate security policies and regulations (e.g.,
GDPR, PCI-DSS, ISO 27001).

Please do let me know if you need additional details from my side.

Thanks,
Indrajeet Deshmukh

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Virender Singla 2025-02-18 09:08:17 PG17 --transaction-size=1000 caused MVU failure
Previous Message Sergey Belyashov 2025-02-18 06:56:56 Re: BUG #18815: Logical replication worker Segmentation fault