Skip to content

No AAD binding between filename and ciphertext #2

@mertenvg

Description

@mertenvg

Severity: Medium

gcm.Seal and gcm.Open are called with nil for AAD. An attacker with write access to the .enc files could swap them (e.g. prod.env.enc ↔ dev.env.enc) and decryption would succeed silently, writing the wrong secrets to the wrong file.
Fix: Pass the filename (or a stable file identifier) as AAD to both Seal and Open.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions