Exploit databaseDownload repository ZIP
GH-20d290386e77dcf7f4f726322eafbf68
fixedbyreboot/cve-2026-11800-poc
Sources for CVE-2026-11800
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files2
fixedbyreboot/cve-2026-11800-pocRevision 317466f44128
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
setup/unpack-images.py
Python · 3,530 bytes#!/usr/bin/env python3
"""Unpack a docker image tar (docker save format) into a merged rootfs directory.
Applies layers in order and honors OverlayFS whiteouts (.wh.<name> files), so the
result matches what the container would see. Used by boot-lab.sh to replay the
exact image bits of quay.io/keycloak/keycloak on a host whose kernel cannot
mount overlayfs (docker pull/save still work there; docker run/build do not).
Usage: unpack-images.py <image.tar> <dest-rootfs-dir>
"""
import json
import os
import shutil
import sys
import tarfile
src_tar, dest = sys.argv[1], sys.argv[2]
os.makedirs(dest, exist_ok=True)
with tarfile.open(src_tar) as t:
manifest = json.load(t.extractfile("manifest.json"))
layers = manifest[0]["Layers"]
print(f"{len(layers)} layers")
for i, layer_path in enumerate(layers):
with tarfile.open(fileobj=t.extractfile(layer_path)) as lt:
members = lt.getmembers()
# first pass: apply this layer's whiteouts against the merged tree
whites = []
for m in members:
base = os.path.basename(m.name)
if base == ".wh..wh..opq":
p = os.path.join(dest, m.name)
if os.path.isdir(p):
for e in os.listdir(p):
full = os.path.join(p, e)
shutil.rmtree(full, ignore_errors=True) if os.path.isdir(full) else os.remove(full)
continue
if base.startswith(".wh."):
whites.append(os.path.join(os.path.dirname(m.name), base[len(".wh."):]))
for w in whites:
p = os.path.join(dest, w)
if os.path.lexists(p):
shutil.rmtree(p, ignore_errors=True) if os.path.isdir(p) and not os.path.islink(p) else os.remove(p)
# second pass: extract the real content (filter='tar' for py3.12+ safety)
for m in members:
base = os.path.basename(m.name)
if base.startswith(".wh."):
continue
norm = os.path.normpath(m.name)
if norm.startswith("/") or ".." in norm.split(os.sep):
print("SKIP unsafe", m.name)
continue
target = os.path.join(dest, norm)
if m.isdir():
os.makedirs(target, exist_ok=True)
elif m.issym():
os.makedirs(os.path.dirname(target), exist_ok=True)
if os.path.lexists(target):
os.remove(target)
os.symlink(m.linkname, target)
elif m.islnk():
src = os.path.join(dest, os.path.normpath(m.linkname))
os.makedirs(os.path.dirname(target), exist_ok=True)
if os.path.lexists(target):
os.remove(target)
if os.path.exists(src):
shutil.copy2(src, target, follow_symlinks=False)
elif m.isfile():
os.makedirs(os.path.dirname(target), exist_ok=True)
if os.path.lexists(target) and not os.path.isdir(target):
os.remove(target)
with open(target, "wb") as out:
shutil.copyfileobj(lt.extractfile(m), out)
os.chmod(target, m.mode)
print(f"layer {i + 1}/{len(layers)} done")
print("ROOTFS READY at", dest)