PKCS12 password exposed in verbose logs via URL query parameter #20
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
mod-nag
mod-nag
mod-nag
mod-nag/ignore
mod-nag/ignore
mod-nag/ignore
nagonag
nagonag/ignore
question
security
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
heiko/cert-proxy#20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The PKCS12 bundle password is sent as a URL query parameter (
?pass=<password>). While the TLS connection protects it in transit, the full URL (including the password) is logged when verbose mode is enabled:cmd/cert-proxy-server/serve.go:20):shared.Verbose("Serving url=%v...", req.URL, ...)cmd/cert-proxy-client/cert/cert.go:175):shared.Verbose("Requesting %s ...", item.remote.URL, ...)Additionally, any reverse proxy or load balancer in front of the server would log the password in access logs.
Exploitation Scenario
An operator enables
-verbosein production for debugging. Log output is captured by a log aggregator (journald, syslog, ELK). An attacker with log access obtains the PKCS12 password. Combined with access to a backup containing the.pfxbundle, they extract the private key.Recommended Fix
Transmit the password in a request header (e.g.,
X-PKCS12-Pass) instead of a query parameter. Headers are not logged by default in most proxies and are not part ofreq.URL.String().Alternatively, redact the
passquery parameter in verbose log output before printing.Security review (2026-05-17) confirms and extends this finding.
Additional reference: the password is injected into the URL at build time in :
This means
item.remote.URLalready contains the plaintext password before the verbose log call at line 180. The server-side exposure atserve.go:20is symmetric —req.URLalso carries the full query string in verbose output.AI attribution comment added per repository instruction for this open issue.\n\n(co)authored by ai:gpt-5-codex