PKCS12 password exposed in verbose logs via URL query parameter #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.