Intel

AIKIDO-2026-770744

python-benedict is vulnerable to Remote code execution

GHSA-v3xm-c46x-phwcPublished Oct 15, 2026
October 15, 2026

80

CVE Score

High

Remote code execution

Are you affected? Scan for Free

TL;DR

python-benedict's benedict() constructor, when format is omitted, calls autodetect_format() in benedict/dicts/io/io_util.py, which infers the deserialization format from a filepath, URL, or S3 key extension via get_format_by_path(). Prior to 0.40.0 this returned "pickle" for a pickle-suffixed source, and decode() then ran PickleSerializer.decode(), which base64-decodes the loaded text and calls pickle.loads(), executing arbitrary code in the process. Explicit from_* loaders pass a format and do not take this path; from_pickle remains an intentional opt-in. The fix returns None from autodetect_format() when the detected format is "pickle", so pickle decoding requires format="pickle" or from_pickle().

How do I fix this?

Upgrade the python-benedict package to version 0.40.0 or later.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and construct a benedict dict from a filepath, URL, or S3 path without passing an explicit format, when that path ends in a pickle extension.

Versions

0.18.1 - 0.39.0

Fixed in 0.40.0

Background info

python-benedict is vulnerable to Remote code execution in versions 0.18.1 - 0.39.0.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea