Skip to content

fix(Change-encryption-mode): From AES-256-CBC to AES-256-GCM#1

Closed
jmjimenezlp wants to merge 3 commits intomainfrom
fix/sec-3181-change-to-aes-256-gcm
Closed

fix(Change-encryption-mode): From AES-256-CBC to AES-256-GCM#1
jmjimenezlp wants to merge 3 commits intomainfrom
fix/sec-3181-change-to-aes-256-gcm

Conversation

@jmjimenezlp
Copy link
Copy Markdown
Collaborator

@jmjimenezlp jmjimenezlp commented Mar 30, 2026

Due to the security audit done in this project is required to change the encryption used: https://dojo.fpkmon.com/finding/2213


Note

Medium Risk
Changes the on-the-wire cookie format and encryption algorithm, so any downstream decryptor (e.g. Akamai) must be updated in lockstep. Crypto refactor also removes the fixed/random IV modes, which could break existing configurations relying on them.

Overview
Migrates cookie encryption from AES-256-CBC to AES-256-GCM (AEAD), generating a fresh random 12-byte nonce per request and encoding cookies as base64(nonce || sealed) (ciphertext + tag).

Removes CBC-specific configuration (iv_mode and CEEP_ENCRYPTION_IV) and updates the plugin to always use GCM when not in set_static_cookie_value mode.

Hardens the emitted cookie by adding HttpOnly; Secure, and updates README.md plus docs/samples/istio-wasmplugin.yaml to reflect the new format and decryption steps.

Written by Cursor Bugbot for commit 421c01f. This will update automatically on new commits. Configure here.

Due to the security audit done in this project is required to change the encryption used: https://dojo.fpkmon.com/finding/2213
@jmjimenezlp jmjimenezlp requested a review from achetronic March 30, 2026 08:26
@jmjimenezlp jmjimenezlp self-assigned this Mar 30, 2026
@jmjimenezlp jmjimenezlp added the enhancement New feature or request label Mar 30, 2026
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

#
# Akamai decryption:
# - Algorithm : AES-256-CBC
# - Algorithm : AES-256-GCM (random 12-byte nonce per cookie, prepended to the value)
Copy link
Copy Markdown
Member

@achetronic achetronic Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, hey, not possible in akamai to decrypt using all the algorithms you want. Just accepting two of them for AES256

Image

CC: @devploit

@achetronic achetronic closed this Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants