CVE-2026-138405
Debug log records the database password under several spellings of the keyword, and the length of masked passwords
AI summary AI generated
An attacker who can read a psqlODBC debug log can obtain database passwords written under alternate keyword spellings, and learn secret lengths, because the log masking is incomplete.
Mitigation
- No fix listed yet: follow the vendor advisory.
Who should check
- Anyone running PostgreSQL psqlODBC <= 18.00.0007
Vulnerability facts
- Affected
- PostgreSQL psqlODBC <= 18.00.0007
- Fixed in
- No fix listed yet
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 5.0 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: Required
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: None
- Availability impact: None
- CWE
- CWE-532
- Modified
Description
Before psqlODBC writes a connection string to its debug log, it masks the password. It masked only a keyword written exactly as PWD or Password. A password given under " PWD", "PWD ", "Passwd" or "sslpassword" went into the log unmasked. The log line for each keyword also showed the value of any keyword the driver does not recognise, so a password under a misspelled keyword was logged as well. A masked secret was replaced one character at a time, so the log showed the length of the password, and of each secret in pqopt. CVE-2026-136504 covers two other ways the password reached the log: the setup dialog's Test button and the Unicode connect functions logged the connection string before it was masked. That is fixed in 18.00.0007. The faults described here are in the masking itself, and they remain in 18.00.0007. The debug log is off by default, and only an administrator turns it on with the Debug setting. Only someone who later reads the log sees the password, which in practice means a log attached to a bug report or sent to support. Versions up to and including psqlODBC 18.00.0007 are affected.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| PostgreSQL psqlODBC | <= 18.00.0007 | — | cvelist |
Versions mentioned in the description AI generated
Extracted by AI; each line quotes the description word for word. Source data above takes precedence.
- Affected: psqlODBC Versions up to and including psqlODBC 18.00.0007 are affected.
Versions up to and including psqlODBC 18.00.0007 are affected.
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-138405. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-138405.md Affected: PostgreSQL psqlODBC <= 18.00.0007 Fixed in: no fixed version listed yet Steps: 1. Search this machine and project for PostgreSQL psqlODBC: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
Technologies
References
Vendor advisories
FAQ
Is CVE-2026-138405 being exploited?
There is no confirmed exploitation: CVE-2026-138405 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.
How serious is CVE-2026-138405?
Medium: CVSS 5.0 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work.
Which versions are affected by CVE-2026-138405?
PostgreSQL psqlODBC <= 18.00.0007.
Is there a fix for CVE-2026-138405?
No fixed version is listed in the sources yet. No fix listed yet: follow the vendor advisory.
How do I check if I'm affected by CVE-2026-138405?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.
More PostgreSQL vulnerabilities
See all| Severity | Identifier / vulnerability | Technology | Signals | Age |
|---|---|---|---|---|
| CRITICAL 9.4 | CVE-2026-138445 Umami through 3.5.0 SQL Injection via Reports API Filter Prefix | Node.js+1 | ||
| HIGH 7.3 | CVE-2026-138406 Another local user's pgenlist.dll runs in the application | PostgreSQL+1 | ||
| MEDIUM 6.3 | CVE-2026-138404 Another local user can read the driver's log files or make it write into the victim's own files (incomplete fix for CVE-2026-120066) | PostgreSQL | ||
| MEDIUM 6.0 | CVE-2026-138032 WhoDB 0.88.0 before 0.132.0 MCP Read-Only Bypass via Server-Side File Writes | MCP servers and SDKs+2 | EPSS 32% | |
| HIGH 8.7 | CVE-2026-137526 ToolJet before 3.21.96-LTS Authorization Bypass via TJDB PostgREST Proxy | PostgreSQL | EPSS 32% |