Intel

AIKIDO-2026-520310

vcrpy is vulnerable to Deserialization of Untrusted Data

Deserialization of Untrusted DataGHSA-rpj2-4hq8-938g Published 3 days ago

78

High Risk

This Affects:

PYTHONvcrpy
0.0.1 - 8.2.0
Fixed in 8.2.1
Are you affected? Scan for Free

TL;DR

The vcrpy library loads YAML cassette files through PyYAML's full loader in vcr/serializers/yamlserializer.py and vcr/migration.py. A crafted cassette containing !!python/object/apply tags executes arbitrary Python code when loaded through VCR().use_cassette(), before any HTTP replay occurs. This can compromise CI runners and developer machines that load attacker-supplied cassettes from pull requests, shared fixture repositories, or poisoned artifacts. The fix uses a safe loader with an allowlist of benign constructors so dangerous Python object tags are rejected while legitimate cassettes continue to load.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

vcrpy is vulnerable to Deserialization of Untrusted Data in versions 0.0.1 - 8.2.0.

How to fix this

Upgrade the vcrpy library to the patch version.