CVE-2017-18342
PyYAML insecurely deserializes YAML strings leading to arbitrary code execution
CVE-2017-18342 is a critical vulnerability (CVSS 9.8) in Pyyaml, published June 27, 2018. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 5.66%, the 92nd percentile. Fixed in pyyaml 5.1.
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
9.8
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.
- Record
CVE-2017-18342- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 2.0
- 7.5 High
AV:N/AC:L/Au:N/C:P/I:P/A:P - Weakness
- CWE-502
- Updated
- 2026-11-02
CVE List No score
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.
- Record
CVE-2017-18342- Updated
- 2026-11-02
EUVDEUVD-2018-0128 No score
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.
- Record
EUVD-2018-0128- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-rprw-h62v-c2w7
9.8
PyYAML insecurely deserializes YAML strings leading to arbitrary code execution
In PyYAML before 5.1, the yaml.load() API could execute arbitrary code. In other words, yaml.safe_load is not used.
This was intended to be fixed in 4.1, but due to breaking changes, 4.1 was yanked and 5.1 contains the patch for CVE-2017-18342.
- Record
GHSA-rprw-h62v-c2w7- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-502
- Updated
- 2026-11-02
OSVBELL-CVE-2017-18342
9.8
CVE-2017-18342 does not affect BellSoft software
- Record
BELL-CVE-2017-18342- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSV
9.8
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.
- Record
CVE-2017-18342- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Show 15 moreShow less
OSVDEBIAN-CVE-2017-18342
9.8
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.
- Record
DEBIAN-CVE-2017-18342- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVGHSA-rprw-h62v-c2w7
9.8
PyYAML insecurely deserializes YAML strings leading to arbitrary code execution
In PyYAML before 5.1, the yaml.load() API could execute arbitrary code. In other words, yaml.safe_load is not used.
This was intended to be fixed in 4.1, but due to breaking changes, 4.1 was yanked and 5.1 contains the patch for CVE-2017-18342.
- Record
GHSA-rprw-h62v-c2w7- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-502
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2017-18342
9.8
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.
- Record
UBUNTU-CVE-2017-18342- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVCLSA-2025-1766103244 No score
TuxCare security update for pyyaml (2 CVEs)
TuxCare rebuilt pyyaml to address 2 CVEs. Fixed in 3.13.post1+tuxcare.
- Record
CLSA-2025-1766103244- Updated
- 2026-11-02
OSVMGASA-2019-0125 No score
Updated python-yaml packages fix security vulnerability
It was found that using yaml.load() API on untrusted input could lead to arbitrary code execution (CVE-2017-18342).
- Record
MGASA-2019-0125- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:11108-1 No score
oci-cli-3.0.2-1.2 on GA media
These are all security issues fixed in the oci-cli-3.0.2-1.2 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:11108-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:11210-1 No score
python36-PyYAML-5.4.1-1.6 on GA media
These are all security issues fixed in the python36-PyYAML-5.4.1-1.6 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:11210-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:11247-1 No score
python36-openapi-spec-validator-0.2.9-1.5 on GA media
These are all security issues fixed in the python36-openapi-spec-validator-0.2.9-1.5 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:11247-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:14089-1 No score
python310-PyYAML-6.0.1-4.1 on GA media
These are all security issues fixed in the python310-PyYAML-6.0.1-4.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:14089-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:14152-1 No score
python310-openapi-spec-validator-0.7.1-1.3 on GA media
These are all security issues fixed in the python310-openapi-spec-validator-0.7.1-1.3 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:14152-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2026:11192-1 No score
python313-openapi-spec-validator-0.9.0-1.1 on GA media
These are all security issues fixed in the python313-openapi-spec-validator-0.9.0-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2026:11192-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2026:11996-1 No score
python313-PyYAML-6.0.3-1.6 on GA media
These are all security issues fixed in the python313-PyYAML-6.0.3-1.6 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2026:11996-1- Updated
- 2026-11-02
OSVPYSEC-2018-49 No score
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.
- Record
PYSEC-2018-49- Updated
- 2026-11-02
OSVSUSE-FU-2022:0444-1 No score
Feature update for venv-salt-minion
This feature update for venv-salt-minion provides the following changes:
- Introduce
venv-salt-minion. - Track already fixed issues.
- Record
SUSE-FU-2022:0444-1- Updated
- 2026-11-02
OSVSUSE-FU-2022:0445-1 No score
Feature update for venv-salt-minion
This feature update for venv-salt-minion provides the following changes:
- Introduce
venv-salt-minion. - Mention fixed issues provided with the bundle.
- Record
SUSE-FU-2022:0445-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
pyyamlPyPI |
before 5.1 | 5.1 |
pyyamlTuxCare:PyPI |
3.13 up to 3.13.post1+tuxcare | 3.13.post1+tuxcare |
pyyamlDebian:12 |
before 5.1.2-1 | 5.1.2-1 |
pyyamlDebian:13 |
before 5.1.2-1 | 5.1.2-1 |
pyyamlDebian:14 |
before 5.1.2-1 | 5.1.2-1 |
pyyamlPyPI |
before 5.1, plus listed versions 3.013.023.033.043.05 Show 17 moreShow less3.063.073.083.093.103.113.123.133.13b13.13rc14.2b14.2b24.2b45.1b15.1b35.1b55.1b7 |
5.1 |
python-yamlMageia:6 |
before 5.1-1.1.mga6 | 5.1-1.1.mga6 |
pyyamlUbuntu:14.04:LTS |
All versions, plus listed versions 3.10-4build23.10-4build33.10-4build43.10-4ubuntu0.1 |
None known |
pyyamlUbuntu:16.04:LTS |
All versions, plus listed versions 3.11-2build13.11-33.11-3build1 |
None known |
pyyamlUbuntu:18.04:LTS |
All versions, plus listed versions 3.12-1build2 |
None known |
Show 6 moreShow less
| Package | Affected | Fixed |
|---|---|---|
oci-cliopenSUSE:Tumbleweed |
before 3.0.2-1.2 | 3.0.2-1.2 |
python-PyYAMLopenSUSE:Tumbleweed |
before 5.4.1-1.6 | 5.4.1-1.6 |
python-PyYAMLopenSUSE:Tumbleweed |
before 6.0.1-4.1 | 6.0.1-4.1 |
python-openapi-spec-validatoropenSUSE:Tumbleweed |
before 0.7.1-1.3 | 0.7.1-1.3 |
python-openapi-spec-validatoropenSUSE:Tumbleweed |
before 0.9.0-1.1 | 0.9.0-1.1 |
python-PyYAMLopenSUSE:Tumbleweed |
before 6.0.3-1.6 | 6.0.3-1.6 |
History
| When | Changed | Sources |
|---|---|---|
| 2026-11-03 | aliases | EUVD |
| 2026-11-02 | created | CVE List, GitHub Advisories, NVD, OSV |
References
github.com/yaml/pyyaml/pull/74
github.com/yaml/pyyaml/blob/master/CHANGES
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/M6JCFGEIEOFMWWIXGHSELMKQDD4CV2BA
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KSQQMRUQSXBSUXLCRD3TSZYQ7SEZRKCE
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JEX7IPV5P2QJITAMA5Z63GQCZA5I6NVZ
github.com/marshmallow-code/apispec/issues/278
Show 194 moreShow less
github.com/yaml/pyyaml/issues/193
github.com/yaml/pyyaml/wiki/PyYAML-yaml.load%28input%29-Deprecation
security.gentoo.org/glsa/202003-45
nvd.nist.gov/vuln/detail/CVE-2017-18342
github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation
github.com/yaml/pyyaml/commit/7b68405c81db889f83c32846462b238ccae5be80
github.com/pypa/advisory-database/tree/main/vulns/pyyaml/PYSEC-2018-49.yaml
lists.fedoraproject.org/archives/list/[email protected]/message/JEX7IPV5P2QJITAMA5Z63GQCZA5I6NVZ
lists.fedoraproject.org/archives/list/[email protected]/message/KSQQMRUQSXBSUXLCRD3TSZYQ7SEZRKCE
lists.fedoraproject.org/archives/list/[email protected]/message/M6JCFGEIEOFMWWIXGHSELMKQDD4CV2BA
github.com/yaml/pyyaml/issues/207
github.com/advisories/GHSA-rprw-h62v-c2w7
docs.bell-sw.com/security/cves/CVE-2017-18342
security-tracker.debian.org/tracker/CVE-2017-18342
github.com/yaml/pyyaml
advisories.mageia.org/MGASA-2019-0125.html
bugs.mageia.org/show_bug.cgi?id=23242
lists.fedoraproject.org/archives/list/[email protected]/thread/JEX7IPV5P2QJITAMA5Z63GQCZA5I6NVZ
suse.com/support/update/announcement/-2022-444/suse-fu-20220444-1
bugzilla.suse.com/1000080
bugzilla.suse.com/1000117
bugzilla.suse.com/1000194
bugzilla.suse.com/1000742
bugzilla.suse.com/1002895
bugzilla.suse.com/1003091
bugzilla.suse.com/1005246
bugzilla.suse.com/1010874
bugzilla.suse.com/1010966
bugzilla.suse.com/1011936
bugzilla.suse.com/1015549
bugzilla.suse.com/1027610
bugzilla.suse.com/1027705
bugzilla.suse.com/1029902
bugzilla.suse.com/1030038
bugzilla.suse.com/1032118
bugzilla.suse.com/1032119
bugzilla.suse.com/1035604
bugzilla.suse.com/1039469
bugzilla.suse.com/1040164
bugzilla.suse.com/1040256
bugzilla.suse.com/1041090
bugzilla.suse.com/1042670
bugzilla.suse.com/1049186
bugzilla.suse.com/1049304
bugzilla.suse.com/1050653
bugzilla.suse.com/1050665
bugzilla.suse.com/1055478
bugzilla.suse.com/1055542
bugzilla.suse.com/1056951
bugzilla.suse.com/1057496
bugzilla.suse.com/1062237
bugzilla.suse.com/1066873
bugzilla.suse.com/1068790
bugzilla.suse.com/1070737
bugzilla.suse.com/1070738
bugzilla.suse.com/1070853
bugzilla.suse.com/1071941
bugzilla.suse.com/1073310
bugzilla.suse.com/1073845
bugzilla.suse.com/1073879
bugzilla.suse.com/1074247
bugzilla.suse.com/1076519
bugzilla.suse.com/1077096
bugzilla.suse.com/1077230
bugzilla.suse.com/1078329
bugzilla.suse.com/1079761
bugzilla.suse.com/1080301
bugzilla.suse.com/1081005
bugzilla.suse.com/1081750
bugzilla.suse.com/1081751
bugzilla.suse.com/1082155
bugzilla.suse.com/1082163
bugzilla.suse.com/1082318
bugzilla.suse.com/1083826
bugzilla.suse.com/1084117
bugzilla.suse.com/1084157
bugzilla.suse.com/1085276
bugzilla.suse.com/1085529
bugzilla.suse.com/1085661
bugzilla.suse.com/1087104
bugzilla.suse.com/1088573
bugzilla.suse.com/1090427
bugzilla.suse.com/1090953
bugzilla.suse.com/1093518
bugzilla.suse.com/1093917
bugzilla.suse.com/1094788
bugzilla.suse.com/1094814
bugzilla.suse.com/1094883
bugzilla.suse.com/1095267
bugzilla.suse.com/1096738
bugzilla.suse.com/1096937
bugzilla.suse.com/1097531
bugzilla.suse.com/1098535
bugzilla.suse.com/1099308
bugzilla.suse.com/1099569
bugzilla.suse.com/1102868
bugzilla.suse.com/1108508
bugzilla.suse.com/1109882
bugzilla.suse.com/1109998
bugzilla.suse.com/1110435
bugzilla.suse.com/1110869
bugzilla.suse.com/1110871
bugzilla.suse.com/1111493
bugzilla.suse.com/1111622
bugzilla.suse.com/1111657
bugzilla.suse.com/1112357
suse.com/security/cve/CVE-2011-3389
suse.com/security/cve/CVE-2011-4944
suse.com/security/cve/CVE-2012-0845
suse.com/security/cve/CVE-2012-1150
suse.com/security/cve/CVE-2013-1752
suse.com/security/cve/CVE-2013-4238
suse.com/security/cve/CVE-2013-4314
suse.com/security/cve/CVE-2014-0012
suse.com/security/cve/CVE-2014-1829
suse.com/security/cve/CVE-2014-1830
suse.com/security/cve/CVE-2014-2667
suse.com/security/cve/CVE-2014-4650
suse.com/security/cve/CVE-2014-7202
suse.com/security/cve/CVE-2014-7203
suse.com/security/cve/CVE-2014-9721
suse.com/security/cve/CVE-2015-2296
suse.com/security/cve/CVE-2016-10745
suse.com/security/cve/CVE-2016-9015
suse.com/security/cve/CVE-2017-18342
suse.com/security/cve/CVE-2018-18074
suse.com/security/cve/CVE-2018-20060
suse.com/security/cve/CVE-2018-7750
suse.com/security/cve/CVE-2019-10906
suse.com/security/cve/CVE-2019-11236
suse.com/security/cve/CVE-2019-11324
suse.com/security/cve/CVE-2019-13132
suse.com/security/cve/CVE-2019-20907
suse.com/security/cve/CVE-2019-20916
suse.com/security/cve/CVE-2019-5010
suse.com/security/cve/CVE-2019-6250
suse.com/security/cve/CVE-2019-8341
suse.com/security/cve/CVE-2019-9740
suse.com/security/cve/CVE-2019-9947
suse.com/security/cve/CVE-2020-14343
suse.com/security/cve/CVE-2020-15166
suse.com/security/cve/CVE-2020-15523
suse.com/security/cve/CVE-2020-15801
suse.com/security/cve/CVE-2020-1747
suse.com/security/cve/CVE-2020-25659
suse.com/security/cve/CVE-2020-26137
suse.com/security/cve/CVE-2020-27783
suse.com/security/cve/CVE-2020-28493
suse.com/security/cve/CVE-2020-29651
suse.com/security/cve/CVE-2020-36242
suse.com/security/cve/CVE-2020-8492
suse.com/security/cve/CVE-2021-23336
suse.com/security/cve/CVE-2021-28957
suse.com/security/cve/CVE-2021-29921
suse.com/security/cve/CVE-2021-3177
suse.com/security/cve/CVE-2021-33503
suse.com/security/cve/CVE-2021-3426
suse.com/support/update/announcement/-2022-445/suse-fu-20220445-1
suse.com/security/cve/CVE-2006-2937
suse.com/security/cve/CVE-2006-2940
suse.com/security/cve/CVE-2006-3738
suse.com/security/cve/CVE-2006-4339
suse.com/security/cve/CVE-2006-4343
suse.com/security/cve/CVE-2006-7250
suse.com/security/cve/CVE-2007-3108
suse.com/security/cve/CVE-2007-4995
suse.com/security/cve/CVE-2007-5135
suse.com/security/cve/CVE-2008-0891
suse.com/security/cve/CVE-2008-1672
suse.com/security/cve/CVE-2008-5077
suse.com/security/cve/CVE-2009-0590
suse.com/security/cve/CVE-2009-0591
suse.com/security/cve/CVE-2009-0789
suse.com/security/cve/CVE-2009-1377
suse.com/security/cve/CVE-2009-1378
suse.com/security/cve/CVE-2009-1379
suse.com/security/cve/CVE-2009-1386
suse.com/security/cve/CVE-2009-1387
suse.com/security/cve/CVE-2010-0740
suse.com/security/cve/CVE-2010-0742
suse.com/security/cve/CVE-2010-1633
suse.com/security/cve/CVE-2010-2939
suse.com/security/cve/CVE-2010-3864
suse.com/security/cve/CVE-2010-5298
suse.com/security/cve/CVE-2011-0014
suse.com/security/cve/CVE-2011-3207
suse.com/security/cve/CVE-2011-3210
suse.com/security/cve/CVE-2011-4108
suse.com/security/cve/CVE-2011-4576
suse.com/security/cve/CVE-2011-4577
suse.com/security/cve/CVE-2011-4619
suse.com/security/cve/CVE-2012-0027
ubuntu.com/security/CVE-2017-18342
cve.org/CVERecord?id=CVE-2017-18342
Left out here: 493 references. The JSON record has them.