Skip to content

Instantly share code, notes, and snippets.

@bram
bram / CVE-2026-31431-vulnrable-test.py
Last active April 30, 2026 10:08
Little script that detects if a machine is vulnrable to CVE-2026-31431. (FileNotFoundError means your machine does not have algif_aead enabled)
import os
import zlib
import socket
import tempfile
NULL_BYTE = b'\x00'
def decrypt_chunk(f, offset, chunk):
a = socket.socket(38, 5, 0)
a.bind(("aead","authencesn(hmac(sha256),cbc(aes))"))