Categories
CVE-2024-5138

Vulnerability in github.com/snapcore/snapd (CVE-2024-5138)

Summary

Vulnerability in github.com/snapcore/snapd (CVE-2024-5138). Risk of unauthorized operations or information disclosure. Mitigation: upgrade to 0.0.0-20240524114846-68ee9c6aa916 or later.

Original description

The description as published by the source.

Impact

A snap with prior permissions to create a mount entry on the host, such as firefox, normally uses the permission from one of the per-snap hook programs. A unprivileged users cannot normally trigger that behaviour by using snap run --shell firefox followed by snapctl mount, since snapd validates the requesting user identity (root or non-root). The issue allows unprivileged users to bypass that check by crafting a malicious command line vector which confuses snapd into thinking the help message is requested.

Unprivileged user on a default installation of Ubuntu, where firefox is as provided as a snap, may cause a denial-of-service attack by repeatedly mounting hunspell database over and over and eventually exhausting system memory.

Other attacks, reliant on the same underying mechanism (mount), are possible. In all cases the snap must be installed and grated permission to perform this action (by connecting an appropriate snap interface), which requires administrative privileges. As such we are focusing on the case of default installation where an unprivileged user may exploit this behavior.

Patches

Patch: https://github.com/canonical/snapd/commit/68ee9c6aa916ab87dbfd9a26030690f2cabf1e14
Release: Available from Snapd 2.64

Workarounds

Users may disconnect any instances of the mount-control interface to prevent snapd from creating such mount points. For example, the firefox snap has the host-hunspell plug, which is of type mount-control. The inter…

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-2024-5138 has been found in github.com/snapcore/snapd.
Risk of unauthorized operations or information disclosure.
What to do: upgrade github.com/snapcore/snapd to 0.0.0-20240524114846-68ee9c6aa916 or later.
If unsure, ask your IT team or search "github.com/snapcore/snapd CVE-2024-5138" on the vendor's site.

CVE-2024-5138 (github.com/snapcore/snapd) — CWE-285
Attack vector: local / unauthenticated / no user interaction
Patched: 0.0.0-20240524114846-68ee9c6aa916 — apply immediately
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

A vulnerability (CWE-285) exists in github.com/snapcore/snapd.

📍 Affected scope

Check the vendor advisory for the affected versions of github.com/snapcore/snapd.

🔥 Severity

Severity: ?. Risk of unauthorized operations or information disclosure.

🔧 How to fix

Update to 0.0.0-20240524114846-68ee9c6aa916.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'github.com/snapcore/snapd' . 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 'github.com/snapcore/snapd' . | grep -v node_modules

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

  2. 2
    Apply patch patch
    Upgrade github.com/snapcore/snapd to 0.0.0-20240524114846-68ee9c6aa916

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

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

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

Affected packages

Go github.com/snapcore/snapd
[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.0.0-20240524114846-68ee9c6aa916"}]}]

Fix status by distribution

Fixed packages published by each distribution for this CVE

References

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