The vulnerability, GHSA-9fxx-mv6c-j5xp (a duplicate of GHSA-8hr7-r645-pc6w), describes a sandbox escape in vm2 versions 3.11.4 through 3.11.6. The core issue lies in how the 'NodeVM' constructor validates the 'require' option when 'nesting' is enabled. The 'hasRealRequireConfig' guard, intended to ensure an explicit 'require' configuration, used a 'typeof' check ('typeof requireOpts === 'object' && requireOpts !== null') that incorrectly evaluated array-shaped inputs (e.g., 'require: []') as valid objects. This bypass allowed the 'makeResolverFromLegacyOptions' function to process this malformed input. Within 'makeResolverFromLegacyOptions', the array was destructured, resulting in 'undefined' values for critical security-related fields like 'builtin' and 'external'. Consequently, an insecure resolver was created that only contained 'NESTING_OVERRIDE.vm2'. This allowed an attacker within the sandbox to 'require('vm2')', create a new 'NodeVM' instance with attacker-controlled built-in allowlists (such as 'child_process'), and execute arbitrary commands on the host system. The analysis identified the 'NodeVM' constructor in 'lib/nodevm.js' as the point of the flawed guard and 'makeResolverFromLegacyOptions' in 'lib/resolver-compat.js' as the function that processed the malformed input, leading to the insecure resolver. Although the code fetched for version 3.11.6 already contained the fix (using 'isPlainConfigObject'), the vulnerability description explicitly details the behavior of the vulnerable versions, which is what these functions represent.