Skip to content
Info disclosure Disclosed report Beginner

Encryption context keys and values logged at INFO level

The server startup code logged every encryption context key and value at INFO level, and the plugin code logged the whole context at DEBUG level. Anyone with read access to centralised logs could see sensitive metadata such as tenant IDs, data classification labels and resource identifiers.

misop00p Follow

Originally disclosed on HackerOne

Informational View original
  • Disclosed after 20 days

Component: cmd/server/main.go:101-106 Affected Version: aws-encryption-provider @ 4341c70 (all versions) Found by: Source audit TLP: TLP:Amber


Summary

The server startup code logs all encryption context key-value pairs at INFO level. Encryption context is metadata associated with KMS operations that can contain sensitive information (tenant IDs, data classification labels, resource identifiers). INFO-level logs are typically collected by centralized logging systems where many operators have read access.


Vulnerable Code

Go
// cmd/server/main.go:101-106
for i, encryptionCtx := range encryptionCtxs {
    for k, v := range encryptionCtx {
        zap.L().Info("encryption-context", zap.Int("index", i), zap.String("key", k), zap.String(
            "value", v))  // <-- logs both key AND value at INFO level
    }
}

Additionally, the plugin Encrypt/Decrypt methods log encryption context at DEBUG level:

Go
// pkg/plugin/plugin.go:147 and plugin_v2.go:150
zap.L().Debug("configuring encryption context", zap.String("ctx", fmt.Sprintf("%v", p.encryptionCtx)))

Suggested Fix

Log that encryption context is configured, but not the values:

Go
zap.L().Info("encryption-context configured", zap.Int("index", i), zap.Int("pairs", len(encryptionCtx)))

Platform

All platforms. Source audit finding.

Impact

Impact

  • Encryption context values visible in container stdout logs
  • In Kubernetes, stdout is captured by kubelet and forwarded to the cluster logging system (CloudWatch, Splunk, etc.)
  • Operators with log read access can see sensitive metadata
  • The DEBUG-level logging in the plugins is less severe (only active with --debug flag)

The original report as published on HackerOne, by misop00p. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the logging call was written to help debugging and passed the whole key-value map to the logger instead of only a count or a confirmation message.

Impact

Encryption context values could be read by operators with log access, including through Kubernetes stdout collection into systems such as CloudWatch or Splunk; the DEBUG-level plugin logging is less severe because it only runs with the debug flag.

What the attacker needed

Read access to centralised logs; sensitive data placed in encryption context

The fix

The code should log only that encryption context is configured, with the index and the number of pairs, and never the keys or values.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Encryption context is extra label data attached to encryption requests, and it can hold things like which customer or which data class a record belongs to. The program wrote those labels into its normal log output, and logs are often copied to a shared logging service that many staff can read. So private labels ended up visible to people who should not see them.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by misop00p

View all

4 more disclosed reports, best first.

More from AWS VDP

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.