Details
CVSS rationale: AV:N, AC:L, PR:L (any workload with a transit-engine permission can do this), UI:N, S:U, C:N / I:N / A:L (low availability impact: log noise + per-request CPU cost; no full DoS because Go's HTTP panic recovery keeps the process up). Score 3.1.
Recommended Fix
Validate the decoded length before slicing. The minimal change at coordinator/internal/transitengineapi/crypto.go:81-87:
fullCiphertext, err := base64.StdEncoding.DecodeString(parts[2])
if err != nil {
return fmt.Errorf("decoding ciphertext: %w", err)
}
if len(fullCiphertext) < aesGCMNonceSize {
return fmt.Errorf("ciphertext is too short: got %d bytes, expected at least %d for the nonce", len(fullCiphertext), aesGCMNonceSize)
}
c.nonce = fullCiphertext[:aesGCMNonceSize]
c.ciphertext = fullCiphertext[aesGCMNonceSize:]
return nil
A defence-in-depth tightening would also reject ciphertexts with len(fullCiphertext) <= aesGCMNonceSize (which would yield an empty actual ciphertext that AES-GCM open would later reject anyway, but a sharper boundary fails earlier with a clearer error). Add a unit test along the lines of the PoC that asserts a clean error rather than a panic.