@@ -22,6 +22,10 @@ package privilege_escalation
2222// CVE-2026-31431 "copy-fail" privilege escalation exploit.
2323// Ported from https://github.com/theori-io/copy-fail-CVE-2026-31431/blob/main/copy_fail_exp.py
2424//
25+ // IMPORTANT: This exploit performs LOCAL PRIVILEGE ESCALATION only (non-root → root
26+ // inside the container). It does NOT escape the container or affect the host.
27+ // You must already have a non-root shell inside the container to use it.
28+ //
2529// The exploit abuses a bug in the interaction between AF_ALG AEAD sockets and
2630// the splice/pipe subsystem. By sending a payload via sendmsg(MSG_MORE) and
2731// then splicing read-only file pages into the same socket's pipe buffers, the
@@ -237,7 +241,9 @@ func CopyFailExploit(targetBin string) error {
237241type copyFailCVE202631431S struct { base.BaseExploit }
238242
239243func (p copyFailCVE202631431S ) Desc () string {
240- return "Overwrite SUID binary page cache via CVE-2026-31431 (AF_ALG + splice). " +
244+ return "CVE-2026-31431 (copy-fail): local privilege escalation from non-root to root " +
245+ "inside the container by overwriting a SUID binary's page cache via AF_ALG + splice. " +
246+ "NOTE: this exploit does NOT escape the container. " +
241247 "Usage: ./cdk run copy-fail-cve-2026-31431 [/usr/bin/su]"
242248}
243249
@@ -250,6 +256,7 @@ func (p copyFailCVE202631431S) Run() bool {
250256 }
251257
252258 log .Printf ("[*] CVE-2026-31431 copy-fail exploit targeting %s\n " , targetBin )
259+ log .Println ("[*] NOTE: This exploit performs local privilege escalation (non-root → root) inside the container only. It does NOT escape the container." )
253260 if err := CopyFailExploit (targetBin ); err != nil {
254261 log .Printf ("[-] Exploit failed: %v\n " , err )
255262 return false
0 commit comments