KeygraphLabs · CVE MCP

CVE-2017-18342 · mitre

CVE-2017-18342

In PyYAML before 5.1, the yaml.load() API could execute arbitrary code if used with untrusted data. The load() function has been deprecated in version 5.1 and the 'UnsafeLoader' has been introduced for backward compatibility with the function.

Published 2018-06-27, last changed 2026-06-17. Weakness: CWE-502.

CVSS
9.8
critical, from NVD
EPSS
4.78%
percentile 92.2%, chance of exploitation in 30 days
Exploitation
None known
no KEV listing or public exploit in our indexes

How to fix

Upgrade to a fixed version: pyyaml 5.1 (PyPI). For the version that clears every advisory for your installed version, ask an agent for get_remediation.

Where the flaw is in the code

Fixed in yaml/pyyaml by pull request #74, 7b68405c81, e471e86bf6. Functions changed by the fix: load, load_all, safe_load, danger_load, safe_load_all, danger_load_all, dump, danger_dump_all, safe_dump_all, safe_dump, danger_dump, CSafeLoader. Regression tests: tests/lib/test_constructor.py, tests/lib/test_recursive.py, tests/lib3/test_constructor.py, tests/lib3/test_recursive.py. Confidence: verified (a record names this commit as the fix, and it changed these functions).

Timeline

2018-06-27Published
2018-06-27Package advisory PYSEC-2018-49
2019-01-04Package advisory GHSA-rprw-h62v-c2w7
2026-06-17Record last changed
2026-11-30EPSS when our history starts: 4.81%
2026-12-02Code-level analysis added

Affected packages

AdvisoryPackageFixed in
GHSA-rprw-h62v-c2w7pyyaml (PyPI)5.1
PYSEC-2018-49pyyaml (PyPI)5.1

Also known as: GHSA-rprw-h62v-c2w7, PYSEC-2018-49

Related

CVEPublishedCVSSSummary
CVE-2020-143432021-02-099.8same package: pyyaml (PyPI)
CVE-2020-17472020-03-249.8same package: pyyaml (PyPI)
CVE-2019-204772020-02-199.8same package: pyyaml (PyPI)
CVE-2026-1147242026-10-228.1same weakness (CWE-502) from the same CNA (mitre)
CVE-2026-377192026-10-059.8same weakness (CWE-502) from the same CNA (mitre)
CVE-2026-364712026-09-215.8same weakness (CWE-502) from the same CNA (mitre)
CVE-2026-511062026-08-269.3same weakness (CWE-502) from the same CNA (mitre)
CVE-2026-513682026-08-259.8same weakness (CWE-502) from the same CNA (mitre)

Add it to your agent

One command for Claude Code; setup for Claude Desktop, Cursor and others. No signup or key.

claude mcp add --transport http keygraph-cve https://cve-mcp.keygraph.io/mcp

Then ask for triage_cve CVE-2017-18342, or call /api/v1/vulnerabilities/CVE-2017-18342. To prove whether it is exploitable in your running app, run Shannon, Keygraph's open-source AI pentester.

NVD · CVE.org