CVE-2026-40148: PraisonAI decompression bomb in recipe registry extraction

CVE-2026-40148 · Severity: medium · CVSS 6.5 · Published 2026-04-09

PraisonAI, a framework for managing AI agents and recipes, is vulnerable to a 'decompression bomb' attack. An attacker can create a specially crafted recipe file that appears small but expands to a massive size when opened, potentially filling up a user's hard drive. This can cause the system to crash or stop working correctly, leading to a denial of service.

Technologies: Praisonai, praisonai (PyPI). Vendors: Praison, PyPI.

Quick answers

Is CVE-2026-40148 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-40148 being exploited in the wild.
How severe is CVE-2026-40148?
Medium severity, with a CVSS score of 6.5, published 9 April 2026.
Which products and versions are affected?
praisonai (PyPI) ECOSYSTEM:introduced=0,fixed=4.5.128.
Is there a fix for CVE-2026-40148?
Yes. praisonai (PyPI): upgrade to 4.5.128 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-40148 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-40148?
Check whether you run Praisonai or praisonai (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • praisonai (PyPI): upgrade to 4.5.128 or later
    pip install "praisonai>=4.5.128"

Technical details

The `_safe_extractall()` function in `src/praisonai/praisonai/recipe/registry.py` fails to validate the uncompressed size or member count of tar archives before extraction. While the function implements path traversal protections, it does not inspect the `size` attribute of `TarInfo` objects. An attacker can provide a malicious recipe bundle via `LocalRegistry.pull()` or `HttpRegistry.pull()` that contains highly compressed data (e.g., 10GB of zeros compressed to 10MB). When a user pulls this recipe, the extraction process exhausts available disk space. This vulnerability is classified as CWE-409 and is fixed in version 4.5.128.

Affected products

  • MervinPraison PraisonAI < 4.5.128

Identifiers

  • CVE-2026-40148
  • GHSA-f2h6-7xfr-xm8w
  • PYSEC-2026-2912

Timeline

  • 2026-04-09: disclosed
  • 2026-04-09: patched: Fixed in version 4.5.128
  • 2026-04-10: advisory

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.