CVE-2021-23420 is a critical-severity (CVSS 9.8) Deserialization of Untrusted Data vulnerability in codeception/codeception. 1 public exploit reference exists, so weaponization risk is real. A fix is available for codeception/codeception — see the affected versions and patch details below.
Deserialization of Untrusted Data in codeception/codeception
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2021-23420 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 385,738 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
codeception/codeception🐘codeception/codeceptionReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
This affects the package codeception/codeception from 4.0.0 and before 4.1.22, before 3.1.3. The RunProcess class can be leveraged as a gadget to run arbitrary commands on a system that is deserializing user input without validation.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | codeception/codeception | all versions | 3.1.3composer require codeception/codeception:^3.1.3 |
| 🐘Packagist | codeception/codeception | ≥ 4.0.0&&< 4.1.22 | 4.1.22composer require codeception/codeception:^4.1.22 |
Affected Products
codeceptioncodeceptionResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for codeception/codeception, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update codeception/codeception to 3.1.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-23420 is resolved across your whole dependency graph.
Workarounds
Do not deserialise data from untrusted sources: where the format allows it, restrict deserialisation to an explicit allowlist of expected types, and prefer a data-only format (JSON, Protobuf) over one that can reconstruct arbitrary objects until you can upgrade.
Frequently Asked Questions
Is CVE-2021-23420 in your dependencies?
Find it across Packagist, including transitive dependencies.