Skip to content

AAK-NEXT-AI-DRAW-001: next-ai-draw-io below 0.4.15 body-accumulation DoS

Severity
MEDIUM
Category
Transport Security (transport-security)
Scanner
agent_audit_kit/scanners/transport_limits.py
Auto-fixable
No.
SARIF name
NextAiDrawBodyDos

What it detects

Project depends on next-ai-draw-io at a version below 0.4.15. CVE-2026-40608 is a body-accumulation OOM in the embedded HTTP sidecar's /api/state, /api/restore and /api/history-svg handlers — the entire request body is concatenated into a JavaScript string without a size cap, so a single ~500 MiB POST exhausts V8 heap and crashes the MCP server. Same DoS class as AAK-MCPFRAME-001. Fixed in 0.4.15.

How to fix

Upgrade next-ai-draw-io to 0.4.15 or later. For custom transports that replicate the pattern, enforce a hard body-size cap before accumulating chunks and reject early when Content-Length exceeds the cap.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-NEXT-AI-DRAW-001

Limitations

Reads the dependency maps and overrides of the package.json at the root of the scanned directory, taking the lowest version a range allows and reporting a reference that states no version, such as a git reference to a commit or a branch (any name holding a / but refs/tags/<tag>). A git reference, a tarball and a workspace: spec are judged by the release they name, with releases compared on their first three numbers, so a pre-release of the fix (#v0.4.15-rc.1) reads as the fix. The same dependency declared in a workspace package's own package.json (apps/web/package.json) is not read, and neither is a package.json over 2 MB. A source file over 512 KB is not read.

References


All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-NEXT-AI-DRAW-001.md: the page then shows that text, with the registry reference appended under it.