Categories
CVE-2026-57825 medium CVSS 5.7

Vulnerability in opam-devel (CVE-2026-57825)

Summary

Vulnerability in opam-devel (CVE-2026-57825). Data can be tampered with by attackers. Exploitable via test. Mitigation: upgrade to 2.5.2, 09c3df1ffb33cc0a09b3a81f36bb74898dce2120, 248f8400e5ecb6ecbd7a672448477d08cedfdc24 or later.

Original description

The description as published by the source.

Summary

Installing files through .install files do not check symlinks resolution of the target path, and so can bypass sandboxing.

Exploit

Let's imagine a test package whose test.install file looks like the following:

share_root: [
  "test" {"blah/pwnd"}
]

and test.opam file:

opam-version: "2.0"
install: ["sh" "-c" "ln -s \"$HOME\" \"%{share}%/blah\""]

Installing this package will write the pwnd file in the home directory of the current user, bypassing sandboxing.

Timeline

  • 2026-05-15: Kate reported the issue to the rest of the opam team and the OCaml Security team
  • 2026-06-22: Nathan wrote a fix which was then reviewed by Raja and refined over the next 2 weeks
  • 2026-07-08: opam 2.5.2 was released with the fix

Source: NIST National Vulnerability Database NVD GitHub Advisory

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-2026-57825 has been found in opam-devel.
Attackers can target a specific entry point like test over the network to misuse the product.
Data can be tampered with by attackers. CVSS score: 5.7/10.
What to do: upgrade opam-devel to 2.5.2, 09c3df1ffb33cc0a09b3a81f36bb74898dce2120, 248f8400e5ecb6ecbd7a672448477d08cedfdc24 or later.
If unsure, ask your IT team or search "opam-devel CVE-2026-57825" on the vendor's site.

CVE-2026-57825 (opam-devel) — CWE-61 / CVSS v3 5.7
Attack vector: remote (network-reachable)
Attack surface: test / test.install / test.opam / pwnd
Patched: 2.5.2, 09c3df1ffb33cc0a09b3a81f36bb74898dce2120, 248f8400e5ecb6ecbd7a672448477d08cedfdc24 — 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-61) exists in opam-devel. Attackers reach the vulnerable code path via test.

📍 Affected scope

Check the vendor advisory for the affected versions of opam-devel. Attack surface: test / test.install / test.opam / pwnd.

🔥 Severity

Severity: Medium (CVSS 5.7/10). Data can be tampered with by attackers.

🔧 How to fix

Update to 2.5.2, 09c3df1ffb33cc0a09b3a81f36bb74898dce2120, 248f8400e5ecb6ecbd7a672448477d08cedfdc24.

🛡️ 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 'opam-devel' . 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 'opam-devel' . | grep -v node_modules

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

  2. 2
    Apply patch patch
    Upgrade opam-devel to 2.5.2, 09c3df1ffb33cc0a09b3a81f36bb74898dce2120, 248f8400e5ecb6ecbd7a672448477d08cedfdc24

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

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

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

Affected packages

opam opam-devel
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.5.2"}]},{"repo":"https:\/\/github.com\/ocaml\/opam","type":"GIT","events":[{"introduced":"0"},{"fixed":"09c3df1ffb33cc0a09b3a81f36bb74898dce2120"}]},{"repo":"https:\/\/github.com\/ocaml\/opam","type":"GIT","events":[{"introduced":"0"},{"fixed":"248f8400e5ecb6ecbd7a672448477d08cedfdc24"}]}]

References

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