Junglewise Threat Intelligence

CVE-2026-43998: patriksimek vm2 remote code execution via symlink traversal in NodeVM

CVE-2026-43998 · Severity: high · CVSS 8.5 · Published 2026-05-13

Executive brief

vm2 is a popular software library used to safely run untrusted code in a restricted 'sandbox' environment. A flaw in how it handles file shortcuts (symlinks) allows an attacker to bypass these restrictions and access sensitive files or run unauthorized commands on the underlying server. This could lead to a full system takeover or the theft of confidential data hosted on the same machine.

Technical details

A path traversal vulnerability exists in vm2's NodeVM due to a discrepancy between path validation and module loading. The 'isPathAllowed' method in 'lib/resolver-compat.js' uses 'path.resolve()', which normalizes paths but does not dereference symlinks. However, the subsequent module loading uses Node's native 'require()', which does follow symlinks. An attacker can exploit this by creating a symlink within the allowed root directory that points to a sensitive module or the vm2 library itself outside the root. This allows the attacker to escape the sandbox and execute arbitrary code in the host context. The vulnerability is fixed in version 3.11.0 by dereferencing symlinks before validation.

Affected products

  • patriksimek vm2 3.10.5
  • Red Hat Self-service automation portal 2 2
  • Red Hat Red Hat Developer Hub 1

Timeline

  • 2026-05-01: advisory: GitHub advisory published by maintainer
  • 2026-05-13: disclosed: CVE published to NVD
  • 2026-05-13: patched: Fixed in version 3.11.0

References

Related threats