Categories
CVE-2021-41078

Unsafe Deserialization in nameko (CVE-2021-41078)

Summary

Vulnerability in nameko (CVE-2021-41078). Successful exploitation can lead to full system takeover. Mitigation: upgrade to 3.0.0rc10 or later.

Original description

The description as published by the source.

Impact

Nameko can be tricked to perform arbitrary code execution when deserialising a YAML config file. Example:

# malicious.yaml
!!python/object/new:type
args: ['z', !!python/tuple [], {'extend': !!python/name:exec }]
listitems: "__import__('os').system('cat /etc/passwd')"
$ nameko run --config malicious.yaml test
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
... 

Patches

The 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.

Versions prior to 2.14.0, and v3.0.0rc0 through v3.0.0rc9 are still vulnerable.

Workarounds

The vulnerability is exploited by config files with malicious content. It can be avoided by only using config files that you trust.

Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2021-41078 has been found in nameko.
Successful exploitation can lead to full system takeover.
What to do: upgrade nameko to 3.0.0rc10 or later.
If unsure, ask your IT team or search "nameko CVE-2021-41078" on the vendor's site.

CVE-2021-41078 (nameko) — CWE-502
Attack vector: local / unauthenticated
Patched: 3.0.0rc10 — apply immediately
Workaround: The vulnerability is exploited by config files with malicious content.
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

Unsafe deserialization (CWE-502) exists in nameko.

📍 Affected scope

Check the vendor advisory for the affected versions of nameko.

🔥 Severity

Severity: ?. Successful exploitation can lead to full system takeover.

🔧 How to fix

Update to 3.0.0rc10.

🛡️ Workaround

Workaround: The vulnerability is exploited by config files with malicious content.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'nameko' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    grep -r 'nameko' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で nameko を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply temporary workaround mitigate
    The vulnerability is exploited by config files with malicious content.

    パッチが適用されるまでの応急処置として、The vulnerability is exploited by config files with malicious content. を実施。回避策の副作用 (機能低下) を確認した上で。

  3. 3
    Apply patch patch
    Upgrade nameko to 3.0.0rc10

    ステージング環境で 3.0.0rc10 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  4. 4
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

PyPI nameko
[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0rc0"},{"fixed":"3.0.0rc10"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details