# zod@4.6.5 security report (npm)

- Verdict: **Critical risk** (risk level: critical)
- Scanned: 2026-10-06T14:25:39.000Z
- Files reviewed: 375
- Findings: 1 critical, 3 high, 12 medium, 46 low severity findings
- Report: https://security.togoder.click/npm/zod
- Source: Togoder Security (https://security.togoder.click), AI source-code review

## Summary

Togoder Security scanned the npm package zod@4.6.5 on Oct 6, 2026. An AI review of 375 source files produced 1 critical, 3 high, 12 medium, 46 low severity findings. At least one finding describes dangerous behavior such as code that runs at install time, credential access or data exfiltration. Do not install this version until you have reviewed the findings below.

## Findings

### [critical] Dynamic code execution

Finding ID: `NPS-9534A8F558A8`

File: `v4/core/doc.cjs:41`

The compile() method uses `Function` constructor (`new F(...Object.keys(this.closed), ...)`) to dynamically compile and execute a function from the document's content and closed-over arguments. This is equivalent to `eval`/`new Function` and can execute arbitrary code at runtime. If an attacker can control `this.content`, `this.args`, or `this.closed` (e.g., via deserialization or untrusted input), this leads to remote code execution.

### [high] Dynamic code execution via new Function

Finding ID: `NPS-5F5E411E3391`

File: `v4/core/compile.js:174`

The code uses `new Function` (aliased as `F`) with dynamically generated JavaScript source code built from schema definitions. While this is core to the AOT compilation design of this validation library, dynamic code generation is a high-risk pattern that can be abused if attacker-controlled values reach the codegen path. Notably, the `numericOperand()` function contains an explicit comment acknowledging this risk: bounds reaching generated source verbatim could allow arbitrary statement injection if types are not enforced. The author mitigates this by validating that bounds are finite numbers before emitting them, but this remains a dangerous pattern requiring careful review.

### [high] Dynamic code execution

Finding ID: `NPS-22B097E9EAFF`

File: `v4/core/doc.cjs:22`

`write()` accepts functions and invokes them with the Doc instance (`arg(this, { execution: "sync" })` and `arg(this, { execution: "async" })`). Combined with `compile()`, this forms a dynamic code generation pipeline where user-supplied callbacks can inject arbitrary strings into the compiled function body.

### [high] Encoded/obfuscated payload construction

Finding ID: `NPS-ADAE75B39B3B`

File: `v4/core/doc.cjs:41`

The `compile()` method builds a function string by interpolating `this.closed` keys, `this.args`, and `this.content` directly into a function body template. This pattern (`return function (${args}) { ... }`) is a common vector for code injection when any of these inputs are attacker-controlled.

### [medium] dynamic code execution

Finding ID: `NPS-464DC8B143DD`

File: `compile.cjs`

The module imports and invokes a compiler (./v4/core/compile.cjs) that, per the accompanying comments, may generate code via `new Function`. The shim respects `globalConfig.jitless` to avoid eval in CSP/no-eval environments, which indicates dynamic code generation is part of the design. This is a legitimate JIT/compilation feature but is a potential vector for code execution if the compiler is compromised or fed untrusted schema definitions.

### [medium] top-level side effect on import

Finding ID: `NPS-2F72A1B28FC3`

File: `src/compile.ts:14`

The file mutates `core.globalConfig.postProcessor` at module evaluation time and is intended to be imported for side effects. This globally alters parsing behavior for all schemas in the process, including those from other libraries, without explicit opt-in beyond the import statement. Any code importing this module changes runtime semantics process-wide.

### [medium] Dynamic code execution

Finding ID: `NPS-8FADB9BF8F4A`

File: `src/v4/core/compile.ts:350`

The module builds validator functions via `new Function(...)` (`const F = Function; const factory = new F(...constantNames, factoryCode)`). While this is the documented purpose of the AOT compiler (generating a fast-path parser from a Zod schema), it is dynamic code execution. The generated source is built from schema definitions, and the code explicitly guards against source-injection via `numericOperand` (which rejects non-number bounds because a string bound would be emitted verbatim into generated source). This is a legitimate, defensively-guarded use, but it remains a `new Function` sink that warrants review in a supply-chain context.

### [medium] Dynamic code execution

Finding ID: `NPS-23A524B6FD8E`

File: `src/v4/core/doc.ts:39`

The compile() method uses `new Function(...)` to construct and execute a function from string content stored in `this.content` and closure names from `this.closed`. While this appears to be a legitimate code-generation mechanism (similar to template engines), dynamic code execution via the Function constructor can be abused to run arbitrary code if the Doc content is influenced by untrusted input, and it bypasses CSP and static analysis.

### [medium] Dynamic code execution via constructor

Finding ID: `NPS-81A99AEED74D`

File: `v4/core/checks.cjs:48`

The module uses core.$constructor and a chain of dynamically constructed check functions. While not directly malicious in this file, the heavy reliance on runtime function construction and prototype manipulation (inst._zod.check = ...) makes behavior dependent on external definitions in core.cjs, regexes.cjs, and util.cjs. This pattern is used by zod v4 for validation but is also a common obfuscation/behavior-injection vector if any of the source modules are tampered with.

### [medium] Use of eval-like constructor / CSP bypass surface

Finding ID: `NPS-EC0A20358DF4`

File: `v4/core/compile.cjs:159`

`const F = Function;` followed by `new F(...constantNames, factoryCode)` is an alias for the Function constructor, i.e. implicit `eval`. This is intrinsic to the compiler's purpose, but security reviewers should note it executes dynamically constructed code in the host realm and can be blocked or risky under strict CSP environments; the code catches this as `ZodCompileUnsupportedError` and falls back to the runtime parser.

### [medium] Dynamic code execution

Finding ID: `NPS-98DDC92F7429`

File: `v4/core/compile.cjs:161`

The file generates JavaScript source code at runtime and executes it via `new Function(...)`. This is core to the AOT compiler design (Zod compile fast path), but `new Function` is a dynamic code execution primitive. The generated code embeds user-supplied callbacks, regex patterns, bounds, and literal values as hoisted constants or inline source. While the code includes backstops such as `numericOperand()` type checking and `util.esc()` escaping to mitigate source injection, any flaw in those guards could allow arbitrary code execution because generated source is constructed from schema definitions. The `options.debug` path also attaches generated code to `fn.code`.

### [medium] Potential code injection via interpolated values in generated source

Finding ID: `NPS-A9D2ADC677B0`

File: `v4/core/compile.js`

Multiple codegen paths interpolate schema-derived values directly into generated JavaScript source using template literals (e.g., `def.value}n`, `${prefix.length}`, `${accessor}[${util.esc(k)}]`). `util.esc` is used for string escaping in some places, but other interpolations rely on the caller having validated types. The `numericOperand` guard is a backstop rather than a complete defense. If schema construction paths (JSON Schema import, programmatic mutation) bypass these checks, arbitrary code execution in the generated function is possible.

### [medium] Dynamic code generation as core mechanism

Finding ID: `NPS-994058829AFD`

File: `v4/core/compile.js`

The `compileFn` function builds a factory via `new Function(...constantNames, factoryCode)` and executes it. This means user-supplied schema definitions and callbacks are hoisted into generated code and executed. While this is the intended design of a compiler, it substantially expands the attack surface: any bug in the codegen escaping or type-checking logic becomes a code execution vulnerability.

### [medium] Global mutable configuration hook

Finding ID: `NPS-7CCF318D51C5`

File: `v4/core/core.js:128`

The code defines and reads a global object `globalThis.__zod_globalConfig` and exposes a `config()` function that allows any code to mutate global configuration. More notably, the schema constructor function `_` invokes `globalThis.__zod_globalConfig?.postProcessor` on every constructed schema instance. Any other module in the same process can install a `postProcessor` that receives every created schema object, giving arbitrary third-party code a hook to inspect and tamper with all Zod schema instances at runtime. This is an undocumented global side-effect and an implicit extension point that could be abused by malicious packages to intercept or mutate schema objects.

### [medium] Use of Function constructor

Finding ID: `NPS-DDBFCB1597C7`

File: `v4/core/doc.js:28`

The code explicitly uses 'const F = Function;' and then 'new F(...)' to generate executable code. While the content is generated internally from writes to the Doc instance, any external input that reaches the write() method could lead to arbitrary code execution when compile() is called.

### [medium] Dynamic code execution

Finding ID: `NPS-81D7292E02B0`

File: `v4/core/doc.js:30`

The compile() method uses the Function constructor to create a new function from the accumulated content string. This is a form of dynamic code execution equivalent to eval, which can be dangerous if the content is influenced by untrusted input.

### [low] import-time side effects

Finding ID: `NPS-BFE94B36FC5D`

File: `compile.cjs`

This file is a side-effect-only module that, upon import, mutates `core.globalConfig.postProcessor` and monkey-patches `inst._zod.run` on every schema constructed afterward. It runs top-level code at import time, modifying global behavior of the zod library. While documented and intentional, this kind of global monkey-patching in a package can surprise consumers and alter runtime semantics (e.g., silently replacing the parser with a compiled version).

### [low] runtime behavior modification

Finding ID: `NPS-2349F20DDBB5`

File: `compile.cjs`

The postProcessor wraps and replaces `inst._zod.run` with a shim that conditionally swaps in compiled execution paths. If compilation fails, it silently falls back to the original runtime. This is not malicious per se, but the pattern of globally intercepting schema execution could be abused in a supply-chain compromise to alter validation results (e.g., skipping checks) if the underlying compile module were tampered with.

### [low] module export freezing

Finding ID: `NPS-F28446128293`

File: `compile.cjs`

The 'seal-cjs-exports' IIFE converts getters to fixed values and calls `Object.freeze(exports)`, preventing downstream modification of the module's exports. This is defensive/anti-tampering and not malicious, but it does make the module harder to patch or audit at runtime.

### [low] dynamic code execution surface

Finding ID: `NPS-DF59DB34AC3C`

File: `src/compile.ts:14`

The module installs a global postProcessor that invokes `compile()` on schemas. The code explicitly references JIT compilation and guards against `new Function` via the `jitless` config, indicating that the compiler generates functions dynamically. While the guard mitigates CSP bypass, this module still triggers dynamic code generation at parse time for any schema constructed after import, which is a significant attack surface if the compiler has flaws.

### [low] global state mutation / monkey-patching

Finding ID: `NPS-B3D8D244E841`

File: `src/compile.ts:43`

The postProcessor replaces `inst._zod.run` on schema instances with a shim, and stores `__originalRun` on the function object. This is a form of runtime monkey-patching that modifies shared library behavior. While the code comments explain the rationale, it can cause subtle interactions (e.g., double-wrapping, recursion guard via `compiling` flag) that may be exploitable or cause unexpected behavior in downstream consumers.

### [low] Dynamic RegExp construction

Finding ID: `NPS-4BBC2F11AEBF`

File: `src/v4/classic/from-json-schema.ts`

User-supplied JSON Schema `pattern` and `patternProperties` values are passed directly to `new RegExp(...)` without validation or escaping. While not malicious itself, this could expose consumers to ReDoS or catastrophic backtracking if untrusted schemas are converted. It is a normal part of implementing JSON Schema semantics, not a security backdoor.

### [low] Prototype-pollution hardening

Finding ID: `NPS-B01B2E299773`

File: `src/v4/classic/from-json-schema.ts`

The code explicitly uses `assignProp` to write `__proto__` keys as own properties instead of through the inherited setter, and guards Object.entries/keys usage. This is defensive, not malicious.

### [low] JSON round-trip normalization

Finding ID: `NPS-2FBED41CF6EE`

File: `src/v4/classic/from-json-schema.ts`

`JSON.parse(JSON.stringify(schema))` is used to normalize input, which is a deliberate defense against cyclic structures, getters, and Proxies. No dynamic evaluation is involved.

### [low] Reflection and runtime schema introspection

Finding ID: `NPS-1B00C9F3B31E`

File: `src/v4/core/compile.ts`

The compiler reflects over arbitrary user-supplied schemas and callbacks, hoisting user functions (`def.fn`, `def.transform`, `def.catchValue`, `def.getter`, `check._zod.check`, `tx`) into generated closures and invoking them. Errors thrown by these callbacks are intentionally propagated (`throwAsync`, transform helpers). This matches documented behavior but means any executable code attached to a schema will run during validation.

### [low] Global symbol registration / sentinel leakage

Finding ID: `NPS-96FDC8169933`

File: `src/v4/core/compile.ts:27`

Uses `Symbol.for("zod.compile.invalid")` and `Symbol.for("zod.compile.fallback")` in the global symbol registry. Benign in itself, but registers globally reachable sentinels that other code could in principle collide with.

### [low] dynamic code execution probe

Finding ID: `NPS-04ACF78EC0BB`

File: `src/v4/core/util.ts`

The `allowsEval` cached function probes for dynamic code execution capability via `new Function("")`, but this is a feature-detection pattern (checking if CSP/jitless environments permit eval), not an execution of external or untrusted input. The result is discarded and the construction is wrapped in try/catch. This is a common pattern in libraries that want to conditionally optimize code paths based on environment capabilities.

### [low] Dynamic code execution

Finding ID: `NPS-90C99EB88B62`

File: `v3/errors.cjs:21`

The code uses an IIFE that calls Object.getOwnPropertyDescriptor and Object.defineProperty to freeze exports; however this is a common pattern for module sealing, not obfuscated malicious code execution.

### [low] Top-level code execution / export sealing

Finding ID: `NPS-5E10234CDD2B`

File: `v3/external.cjs:21`

The file contains an immediately-invoked function expression (IIFE) that runs at import time, iterating over all exported properties, invoking their getters, and redefining them as non-configurable frozen values before calling Object.freeze(exports). While this pattern is used by some libraries to enforce immutable CommonJS exports, it executes arbitrary getter logic at module load and permanently mutates the module exports object. This can interfere with consumers and is an unusual pattern that warrants review, though it does not appear to exfiltrate data or execute external code.

### [low] Dynamic getter invocation

Finding ID: `NPS-15855FBA2433`

File: `v3/external.cjs:30`

The code calls desc.get() for every exported property whose descriptor defines a getter. If any re-exported module defines side-effecting getters, this would trigger those effects at import time. In this specific file the re-exported modules (errors, parseUtil, typeAliases, util, types, ZodError) are part of the Zod library and appear benign, but the mechanism itself is a potential vector for unexpected top-level execution.

### [low] Top-level code execution

Finding ID: `NPS-B3A4073463C8`

File: `v4/classic/errors.cjs`

The file executes code at import time, including a prototype manipulation initializer and an IIFE that seals/freezes the module exports. This is standard module initialization behavior, not a malicious install-time hook.

### [low] Prototype mutation

Finding ID: `NPS-B2717DA2D22D`

File: `v4/classic/errors.cjs`

The initializer lazily installs non-enumerable getter/setter methods on the prototype of ZodError instances. It explicitly guards against touching Object.prototype and Error.prototype via a WeakSet to avoid prototype pollution. This is a deliberate design choice, not an attack pattern.

### [low] sealed exports pattern

Finding ID: `NPS-C202812A8C37`

File: `v4/classic/iso.cjs:45`

The 'seal-cjs-exports' IIFE at the bottom freezes the exports object and converts getter properties into non-writable, non-configurable values. This is a defensive measure used by some bundlers (e.g. esbuild-style or tsup output for Zod) to ensure CommonJS interop consistency. It does not execute external code, access the filesystem, or perform network activity. Behavior is deterministic and limited to the module's own exports object.

### [low] export sealing/freezing

Finding ID: `NPS-D4E3D108B5BB`

File: `v4/classic/parse.cjs`

The file freezes its exports and replaces getters with static values to prevent later tampering. This is a legitimate hardening pattern used by Zod, not a malicious behavior.

### [low] Global prototype / object manipulation

Finding ID: `NPS-E6010F034E57`

File: `v4/core/checks.cjs:5`

Object.defineProperty on 'default', __createBinding, __setModuleDefault helpers mutate module exports. Standard TS/CommonJS interop, but the pattern combined with dynamic getter invocation in the sealing IIFE could be leveraged to force-evaluate attacker-injected getters if the package is compromised at publish time.

### [low] Dynamic RegExp construction from user-controlled strings

Finding ID: `NPS-1150A5B87913`

File: `v4/core/checks.cjs:331`

RegExp objects are dynamically constructed from def.includes, def.prefix, def.suffix in $ZodCheckIncludes, $ZodCheckStartsWith, $ZodCheckEndsWith. Values are passed through util.escapeRegex first, which mitigates ReDoS injection, but the pattern still takes runtime input into RegExp construction. This is legitimate validation logic for zod, not malicious.

### [low] Top-level execution at import time

Finding ID: `NPS-F5A84ED7C8DE`

File: `v4/core/checks.cjs:467`

The file executes an IIFE ('seal-cjs-exports') at module load time that enumerates all exports, invokes their getters, and freezes the exports object. Getters can run arbitrary code; while here they resolve to defined constructors, this pattern (firing property getters on import and freezing the module namespace) is unusual for a plain library module and can force evaluation of lazily-initialized code paths at import.

### [low] Expected validation logic

Finding ID: `NPS-EDD5E444102F`

File: `v4/core/checks.js`

The file implements Zod validation checks (min/max length, size, numeric bounds, regex/format checks, property validation, etc.) using constructor helpers. It imports only internal modules (core, regexes, util). No network, filesystem, process, environment, or dynamic code execution APIs are used. The eval-like comment in $ZodCheckProperty is a legitimate regex anchor comment, not dynamic code execution. No obfuscated payloads, credential harvesting, exfiltration, mining, or backdoor patterns are present.

### [low] Patching of parse/safeParse/run methods

Finding ID: `NPS-CA889278A0E7`

File: `v4/core/compile.cjs:145`

`installCompiledUserMethods` replaces `parse` and `safeParse` on the returned schema clone, and `withParser` replaces `_zod.run`. This is documented compiler behavior for schema objects only, not globals, and it captures `originalRun`/`originalParse` fallbacks. It is not a global monkey-patch, but it does mutate exported API surface and should be confirmed to not affect unrelated objects.

### [low] Getters invoked during generated validation

Finding ID: `NPS-0B6AB5B1D13C`

File: `v4/core/compile.cjs:1082`

Generated code reads input properties once and calls `.trim()`, `.toLowerCase()`, `.includes()`, `instanceof`, `%`, etc. Object getters on untrusted input are invoked during fast-path validation (cached once per key, but still executed). This matches runtime parser behavior, though it means the compiled fast path is not safe for hostile objects with side-effecting getters unless the runtime parser has the same property.

### [low] Prototype manipulation handling

Finding ID: `NPS-0B4E6D6A6E72`

File: `v4/core/compile.cjs:1110`

The code explicitly guards against `__proto__` keys in object shapes, records, and catchall loops (`obj["__proto__"]` prototype setter concerns). These guards appear defensive and correctness-oriented, but repeated handling of `__proto__` and `Object.getOwnPropertyNames`/`getOwnPropertySymbols` walks indicates the compiler accepts attacker-influenced key names and must be audited to ensure the guards cannot be bypassed to cause prototype pollution in generated outputs.

### [low] Invocation of user-supplied callbacks in generated code

Finding ID: `NPS-7D1185359180`

File: `v4/core/compile.cjs:1289`

Multiple generated sections call user callbacks directly: refinements (`def.fn`), superRefine checks (`check._zod.check`), transforms, overwrite transforms, catch values, lazy getters, string-format predicates, and discriminated-union literals. These are expected schema-author-owned functions, but they are hoisted into generated source and invoked at parse time. The helpers `generateTransformCheck`, `generatePipeCheck`, and `generateCustomRefineCheck` spoof payload/`addIssue` and deliberately do not catch throws, allowing arbitrary exceptions from user code to propagate.

### [low] No data exfiltration, network, filesystem, or process-spawning patterns detected

Finding ID: `NPS-56C1570810EB`

File: `v4/core/compile.js`

The file does not import or reference any network APIs, environment variables, credential files, child_process, shell commands, filesystem manipulation, or crypto wallet logic. No obfuscation or encoded payloads were found.

### [low] Modification of global Error.stackTraceLimit

Finding ID: `NPS-3C599C8FB2EA`

File: `v4/core/core.js:22`

`newError` temporarily sets `Error.stackTraceLimit = 0` and restores it. It handles failures, but it still mutates a shared global object at parse time. If the restore is interrupted (e.g., a getter/setter trap on Error, or concurrent async code), the global stack trace limit can be left in an altered state for the entire process. This is a global side-effect rather than a security compromise, but it is a cross-cutting mutation of a shared builtin.

### [low] Top-level global side effect on import

Finding ID: `NPS-3D199E5D0B68`

File: `v4/core/core.js:148`

At module import time the code runs `(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {})`, unconditionally creating a global property on the host environment. Importing the package therefore mutates the global object, which is a side effect that can interact with other libraries or be used as a coordination channel by other packages.

### [low] dynamic-code-execution

Finding ID: `NPS-4CC687A273FA`

File: `v4/core/memoizer.cjs`

The code wraps schema parse functions at runtime and manipulates prototype-like properties, but does not use eval, Function constructor, or any dynamic code execution from external input. The wrapping is internal to the Zod memoization logic.

### [low] install-time-execution

Finding ID: `NPS-AF65CB852766`

File: `v4/core/memoizer.cjs`

The file contains an IIFE at the bottom that seals and freezes exports at import time. This executes on module load but performs only local property descriptor inspection and freezing of its own exports; no network, filesystem, or process access.

### [low] global state pollution

Finding ID: `NPS-BC3C88AD5DE4`

File: `v4/core/registries.js:60`

The code assigns a global registry to globalThis.__zod_globalRegistry. This is expected Zod behavior for sharing a registry across module instances, not a malicious pattern. It only stores schema references and metadata locally and performs no network, filesystem, or process operations.

### [low] Import-time module sealing

Finding ID: `NPS-F26A4FC95641`

File: `v4/core/to-json-schema.cjs`

A top-level IIFE at the end of the file ('seal-cjs-exports') converts getter-only export properties into frozen data properties and calls Object.freeze(exports). This runs at import time but is a benign anti-tampering measure on the module's own exports; it does not touch global state, files, network, or processes.

### [low] Dynamic code execution probe

Finding ID: `NPS-9B329B5A88BB`

File: `v4/core/util.cjs`

The `allowsEval` cached getter uses `new Function("")` to probe whether eval-like dynamic code execution is allowed. While wrapped in try/catch and gated by config/userAgent checks, it directly invokes the Function constructor, which is a red-flag pattern for dynamic code execution and could be abused if the cached result or configuration is tampered with. The code does not actually execute attacker-controlled strings, but the presence of `new Function` at module import time is noteworthy.

### [low] Top-level execution on import

Finding ID: `NPS-41C16C7CD885`

File: `v4/core/util.cjs`

The file contains a top-level IIFE 'seal-cjs-exports' that runs at import time, iterating over exports, invoking getters, and freezing the exports object. This is benign module hardening but constitutes code that executes on import. No network, filesystem, or process access is involved.

### [low] Insecure randomness generation

Finding ID: `NPS-5519D147D384`

File: `v4/core/util.cjs`

`randomString` uses `Math.random()` to generate strings. This is unsuitable for any security-sensitive use (tokens, IDs, nonces). The function is exported and could be misused by downstream callers expecting cryptographic randomness. This is a security-hygiene issue, not a malicious pattern.

### [low] Prototype pollution surface

Finding ID: `NPS-385520BA3E80`

File: `v4/core/util.cjs`

Several utilities manipulate object descriptors and prototypes (`mergeDefs`, `createTransparentProxy`, `putProp`, `mirrorShape`, `defineLazy`, `defineLazyInternal`, `installLazyProp`, `members`, `derived`). `finalizeIssue` explicitly skips `__proto__` keys, indicating awareness of prototype pollution. The code generally guards against inherited setters with `assignProp`/`own`, but the extensive use of `Reflect` and `Object.defineProperty` on arbitrary keys is a potential attack surface if inputs are attacker-controlled.

### [low] prototype-sensitive property writes

Finding ID: `NPS-A82024CEA093`

File: `v4/core/util.js:120`

Helpers such as `putProp`, `assignProp`, `deferProp`, `defineLazy`, and `defineLazyInternal` use `Object.defineProperty` and guard with `key in target`. The code includes explicit defenses against `__proto__` setter abuse and prototype pollution in `putProp` and `finalizeIssue`, indicating awareness of these risks rather than exploitation.

### [low] weak randomness

Finding ID: `NPS-473085D25553`

File: `v4/core/util.js:178`

`randomString` uses `Math.random()`, which is not cryptographically secure. This is a quality concern for security-sensitive use but not malicious; it appears intended for non-cryptographic identifiers.

### [low] dynamic code execution probe

Finding ID: `NPS-BE2AC035AEB6`

File: `v4/core/util.js:188`

The `allowsEval` helper uses `new Function('')` to detect whether CSP/JIT restrictions allow dynamic code evaluation. This is a capability probe with the throw swallowed and no untrusted input passed, matching the documented purpose in the surrounding comment; it does not execute attacker-controlled code.

### [low] Sealed exports pattern

Finding ID: `NPS-2933FF9824E9`

File: `v4/index.cjs`

The code freezes the exports object and converts getters to static values. This is a defensive pattern to prevent runtime modification and does not constitute malicious behavior.

### [low] Deprecated alias

Finding ID: `NPS-7FBA43DB92FE`

File: `v4/locales/ua.cjs`

This file only re-exports the Ukrainian locale from './uk.cjs' and marks the previous 'ua' locale as deprecated. It contains no suspicious imports, network calls, environment access, dynamic execution, or process spawning.

### [low] Top-level code execution

Finding ID: `NPS-B6527AE9C537`

File: `v4/mini/deep-partial.cjs:60`

The IIFE at the end of the file runs at import time to seal/freeze the exports object. This is a benign pattern used to prevent mutation of exports and does not perform any malicious activity such as network access, file system manipulation, or process spawning.

### [low] Code that runs at import time

Finding ID: `NPS-E6F1D042D337`

File: `v4/mini/parse.cjs:18`

An IIFE executes at module load to seal exports by converting getters to static values and freezing the exports object. This is a defensive measure to prevent export tampering, not malicious. It does not access external resources, environment variables, or execute dynamic code.

### [low] Import-time side effects / export sealing

Finding ID: `NPS-610DEC9923C8`

File: `v4/mini/schemas.cjs`

The IIFE at the end of the module executes at import time, iterating over all own property names of `exports`, invoking getters, and redefining them as non-configurable, non-writable frozen values before calling Object.freeze(exports). While this pattern is a defensive measure common in library bundles (here likely to fix circular-require semantics), it is a top-level side effect that mutates the module namespace and can break consumers relying on live bindings or monkey-patching. Any module that runs code on import deserves scrutiny, though no exfiltration or command execution is present.

### [low] Dynamic getter invocation from exports

Finding ID: `NPS-CED5E7F482FF`

File: `v4/mini/schemas.cjs`

The sealing IIFE calls `desc.get()` on every configurable getter export. If any export were defined as a getter with side effects, those side effects would be triggered at import time. In this file the getters map to plain schema functions, so no malicious behavior occurs, but the pattern of invoking accessors over the whole exports object is unusual and would be a useful camouflage for lazily triggered payloads in a tampered package.

## Files reviewed

- `v4/core/checks.cjs` (critical): This is the legitimate zod v4 validation library's checks module; no exfiltration, credential harvesting, shell spawning, network calls, install-time hooks, or obfuscated payloads are present, though it uses dynamic getter evaluation and RegExp construction patterns that would be concerning if the package were tampered with.
- `v4/core/doc.cjs` (critical): The Doc class dynamically compiles and executes arbitrary JavaScript via the Function constructor using content, argument names, and closed-over values, enabling code injection/RCE if any of these are influenced by untrusted input.
- `compile.cjs` (medium): This is a legitimate zod compiler side-effect module that performs global monkey-patching and relies on a dynamic code compiler, but contains no exfiltration, credential harvesting, network access, process spawning, or other overtly malicious patterns.
- `src/compile.ts` (medium): This module is not overtly malicious and contains no exfiltration, credential harvesting, shell execution, or network access, but it performs process-wide global monkey-patching and triggers dynamic JIT code generation at parse time via a side-effect import, which warrants caution.
- `src/v4/core/compile.ts` (medium): This is a legitimate Zod AOT compiler module whose only notable security-relevant behavior is deliberate `new Function` code generation (with explicit source-injection guards) plus invocation of user-supplied schema callbacks; no exfiltration, credential harvesting, network, process, or filesystem activity was found.
- `src/v4/core/doc.ts` (medium): The file implements a code-generation utility that uses `new Function` for dynamic evaluation; no exfiltration, credential harvesting, process spawning, or network activity was detected, but dynamic code execution warrants review of how Doc content is populated.
- `v3/external.cjs` (medium): The file is a standard Zod CommonJS re-export shim with an additional export-sealing IIFE that mutates and freezes exports at import time; no exfiltration, credential harvesting, obfuscation, or dynamic code execution was found, but the runtime export mutation is worth noting.
- `v4/core/compile.cjs` (medium): This is a legitimate Zod AOT compiler module that intentionally uses `new Function` to emit fast-path validators from schema definitions; the dynamic code generation and invocation of user callbacks are inherent to its purpose, but they represent the main security-relevant surface and require the existing escaping/type backstops to remain sound.
- `v4/core/compile.js` (medium): This is a legitimate Zod schema compiler that relies on dynamic code generation via new Function; the main security concern is the inherent risk of codegen-based execution and string interpolation of schema values into generated source, though mitigation guards are present.
- `v4/core/core.js` (medium): No direct malicious behavior (no exfiltration, eval, shells, or credential theft) was found, but the module exposes an undocumented global `postProcessor` hook invoked on every schema construction and mutates global Error/globalThis state at import and runtime, which warrants caution.
- `v4/core/doc.js` (medium): The code contains dynamic code execution via the Function constructor, which is a potential security risk if untrusted input can reach the write method.
- `v4/core/util.cjs` (medium): This is legitimate Zod v4 utility code (schema manipulation, lazy property installation, encoding helpers); it contains no exfiltration, credential harvesting, backdoors, or process/network abuse, though it uses `new Function` for a capability probe and `Math.random()` for string generation, both non-malicious but worth noting.
- `v4/mini/schemas.cjs` (medium): This is the legitimate Zod Mini schema definition file; the only notable behavior is an import-time IIFE that freezes/seals exports, which is a defensive pattern rather than a malicious one, so the file is not a security risk but does contain non-trivial top-level side effects.
- `compile.js` (safe): No malicious patterns detected; the file only installs an internal compile-time optimization shim with no network, filesystem, process, or obfuscation behavior.
- `index.cjs` (safe): No malicious patterns detected
- `index.js` (safe): Cleared by Jev triage; no further analysis needed
- `locales/index.cjs` (safe): This is a standard TypeScript-generated CommonJS re-export file that seals exports; no malicious patterns detected.
- `locales/index.js` (safe): Cleared by Jev triage; no further analysis needed
- `mini/index.cjs` (safe): No malicious patterns detected; the file contains standard TypeScript/CommonJS interop helpers and a defensive export-sealing routine.
- `mini/index.js` (safe): Cleared by Jev triage; no further analysis needed
- `src/index.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/locales/index.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/mini/index.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v3/ZodError.ts` (safe): This is the legitimate Zod error-handling module; no malicious patterns, network calls, credential access, dynamic execution, or install-time behavior were detected.
- `src/v3/benchmarks/datetime.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v3/benchmarks/discriminatedUnion.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v3/benchmarks/index.ts` (safe): No malicious patterns detected; the file is a standard benchmark runner that reads CLI arguments and runs in-memory benchmarks without network, filesystem, or process-spawning operations.
- `src/v3/benchmarks/ipv4.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v3/benchmarks/object.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v3/benchmarks/primitives.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v3/benchmarks/realworld.ts` (safe): No malicious patterns detected; the code is a standard Zod validation benchmark with no network, filesystem, process, or obfuscated behavior.
- `src/v3/benchmarks/string.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v3/benchmarks/union.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v3/errors.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v3/external.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v3/helpers/enumUtil.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v3/helpers/errorUtil.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v3/helpers/parseUtil.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v3/helpers/partialUtil.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v3/helpers/typeAliases.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v3/helpers/util.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v3/index.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v3/locales/en.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v3/standard-schema.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4-mini/index.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/classic/checks.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/classic/coerce.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/classic/compat.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/classic/deep-partial.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/classic/errors.ts` (safe): No malicious patterns detected; the code only implements error handling and prototype-based lazy method installation for Zod validation errors.
- `src/v4/classic/external.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/classic/from-json-schema.ts` (safe): The file is a legitimate JSON Schema to Zod converter with no network, filesystem, process-spawning, credential-harvesting, or dynamic-code-execution behavior; minor ReDoS considerations from user-supplied regex patterns are inherent to JSON Schema.
- `src/v4/classic/in-out.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/classic/index.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/classic/iso.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/classic/parse.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/core/api.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/core/checks.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/core/core.ts` (safe): No malicious patterns detected; the code is part of Zod's core constructor logic with no data exfiltration, credential harvesting, dynamic code execution, or process spawning.
- `src/v4/core/errors.ts` (safe): No malicious patterns detected; the file contains only type definitions and error-formatting utilities with explicit prototype-pollution hardening, no network, filesystem, process, or dynamic execution behavior.
- `src/v4/core/index.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/core/json-schema-generator.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/core/json-schema-processors.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/core/json-schema.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/core/memoizer.ts` (safe): The TypeScript memoizer implements schema parsing cycle detection and caching with no network, filesystem, process, or dynamic code execution patterns.
- `src/v4/core/parse.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/core/regexes.ts` (safe): No malicious patterns detected; the file only defines regexes and regex-builder helpers for validation purposes.
- `src/v4/core/registries.ts` (safe): No malicious patterns detected; the code implements a Zod metadata registry with type utilities and a global registry singleton, with no exfiltration, credential harvesting, obfuscation, process spawning, or other red flags.
- `src/v4/core/standard-schema.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/core/to-json-schema.ts` (safe): No malicious patterns detected; this is a legitimate Zod v4 JSON Schema conversion utility with no network, filesystem, process, or dynamic code execution activity.
- `src/v4/core/util.ts` (safe): This is a utility/type-definitions module from a Zod-like validation library; no malicious patterns such as data exfiltration, credential harvesting, obfuscated payloads, backdoors, or process spawning were detected, with only a benign eval-capability feature-detection probe present.
- `src/v4/core/versions.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/core/visit.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/core/zsf.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/index.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/ar.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/az.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/be.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/bg.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/bn.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/ca.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/ckb.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/cs.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/da.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/de.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/el.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/en.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/eo.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/es.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/fa.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/fi.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/fr-CA.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/fr.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/gu.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/he.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/hi.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/hr.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/hu.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/hy.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/id.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/index.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/is.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/it.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/ja.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/ka.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/kh.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/km.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/kn.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/ko.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/lt.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/mk.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/ms.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/ne.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/nl.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/nn.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/no.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/ota.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/pl.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/ps.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/pt-BR.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/pt.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/ro.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/ru.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/sk.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/sl.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/sv.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/ta.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/tg.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/th.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/tk.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/tr.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/ua.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/uk.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/ur.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/uz.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/vi.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/yo.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/zh-CN.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/locales/zh-TW.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/mini/checks.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/mini/coerce.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/mini/deep-partial.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/mini/external.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/mini/in-out.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/mini/index.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/mini/iso.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/mini/parse.ts` (safe): Cleared by Jev triage; no further analysis needed
- `src/v4/mini/schemas.ts` (safe): Cleared by Jev triage; no further analysis needed
- `v3/ZodError.cjs` (safe): No malicious patterns detected; this is standard Zod error-handling code with prototype-safe error formatting and export sealing.
- `v3/ZodError.js` (safe): No malicious patterns detected; the code is a standard Zod error-handling implementation with no exfiltration, obfuscation, dynamic execution, or filesystem/network abuse.
- `v3/errors.cjs` (safe): No malicious patterns detected; the code only manages error map overrides and seals exports using standard reflection APIs.
- `v3/errors.js` (safe): Cleared by Jev triage; no further analysis needed
- `v3/external.js` (safe): Cleared by Jev triage; no further analysis needed
- `v3/helpers/enumUtil.cjs` (safe): The code only seals and freezes the module's exports object; no malicious patterns detected.
- `v3/helpers/enumUtil.js` (safe): Cleared by Jev triage; no further analysis needed
- `v3/helpers/errorUtil.cjs` (safe): No malicious patterns detected; the file only provides simple error message conversion utilities and a defensive export sealing routine that executes at import time but performs no external, filesystem, or process operations.
- `v3/helpers/errorUtil.js` (safe): No malicious patterns detected
- `v3/helpers/parseUtil.cjs` (safe): No malicious patterns detected; the file contains only standard Zod library parsing utilities with no network, filesystem, credential, or code-execution activity.
- `v3/helpers/parseUtil.js` (safe): Cleared by Jev triage; no further analysis needed
- `v3/helpers/partialUtil.cjs` (safe): The code only seals and freezes the module's exports object; no malicious patterns detected.
- `v3/helpers/partialUtil.js` (safe): Cleared by Jev triage; no further analysis needed
- `v3/helpers/typeAliases.cjs` (safe): The code only seals and freezes the module's exports object; no malicious patterns detected.
- `v3/helpers/typeAliases.js` (safe): Cleared by Jev triage; no further analysis needed
- `v3/helpers/util.cjs` (safe): No malicious patterns detected; the code is a standard Zod utility module with a benign export-sealing routine.
- `v3/helpers/util.js` (safe): No malicious patterns detected
- `v3/index.cjs` (safe): No malicious patterns detected; the code is a standard CommonJS export shim with a sealing mechanism that freezes exports, containing no data exfiltration, credential harvesting, obfuscation, or dynamic code execution.
- `v3/index.js` (safe): Cleared by Jev triage; no further analysis needed
- `v3/locales/en.cjs` (safe): Cleared by Jev triage; no further analysis needed
- `v3/locales/en.js` (safe): Cleared by Jev triage; no further analysis needed
- `v3/standard-schema.cjs` (safe): The code only seals and freezes the module's exports object; no malicious patterns detected.
- `v3/standard-schema.js` (safe): Cleared by Jev triage; no further analysis needed
- `v4-mini/index.cjs` (safe): No malicious patterns detected; the file contains standard TypeScript/CommonJS interop helpers and a defensive export-sealing routine.
- `v4-mini/index.js` (safe): Cleared by Jev triage; no further analysis needed
- `v4/classic/checks.cjs` (safe): The file is a standard re-export module that delegates validation checks to ../core/index.cjs and freezes exports; no malicious patterns, obfuscation, network, filesystem, or process activity detected.
- `v4/classic/checks.js` (safe): Cleared by Jev triage; no further analysis needed
- `v4/classic/coerce.cjs` (safe): No malicious patterns detected; the file contains standard TypeScript/CommonJS helper functions and Zod schema wrappers with no network, filesystem, process, or obfuscation concerns.
- `v4/classic/coerce.js` (safe): Cleared by Jev triage; no further analysis needed
- `v4/classic/compat.cjs` (safe): No malicious patterns detected; the file is a standard TypeScript-generated Zod v3 compatibility shim that only re-exports core utilities and freezes its exports.
- `v4/classic/compat.js` (safe): Cleared by Jev triage; no further analysis needed
- `v4/classic/deep-partial.cjs` (safe): No malicious patterns detected; the code is standard TypeScript/CommonJS interop and Zod schema transformation logic with an export-sealing helper.
- `v4/classic/deep-partial.js` (safe): Cleared by Jev triage; no further analysis needed
- `v4/classic/errors.cjs` (safe): The file is a standard CommonJS build artifact for Zod error classes; it contains only module initialization, lazy prototype helpers, and export sealing, with no exfiltration, credential harvesting, dynamic code execution, or shell/process spawning.
- `v4/classic/errors.js` (safe): No malicious patterns detected; the code implements lazy error-method installation for ZodError with no network, filesystem, process, or dynamic-execution behavior.
- `v4/classic/external.cjs` (safe): This is a standard TypeScript-compiled CommonJS re-export barrel file for the zod library with no malicious patterns detected.
- `v4/classic/external.js` (safe): Cleared by Jev triage; no further analysis needed
- `v4/classic/from-json-schema.cjs` (safe): No malicious patterns detected; the file is a legitimate JSON Schema to Zod converter with no network, filesystem, process, or dynamic execution risks.
- `v4/classic/from-json-schema.js` (safe): No malicious patterns detected; the code is a legitimate JSON Schema to Zod converter with no network, filesystem, process, or dynamic execution activities.
- `v4/classic/in-out.cjs` (safe): This is a standard Zod library utility module that performs schema traversal and cloning with no malicious patterns detected.
- `v4/classic/in-out.js` (safe): Cleared by Jev triage; no further analysis needed
- `v4/classic/index.cjs` (safe): No malicious patterns detected; the code is standard TypeScript-generated CJS interop boilerplate with a safe export-sealing IIFE.
- `v4/classic/index.js` (safe): Cleared by Jev triage; no further analysis needed
- `v4/classic/iso.cjs` (safe): This is a standard CommonJS interop wrapper for the Zod ISO schema module with a benign export-sealing IIFE; no malicious patterns were detected.
- `v4/classic/iso.js` (safe): Cleared by Jev triage; no further analysis needed
- `v4/classic/parse.cjs` (safe): No malicious patterns detected; the code is standard Zod CJS export wiring with export sealing.
- `v4/classic/parse.js` (safe): Cleared by Jev triage; no further analysis needed
- `v4/classic/schemas.cjs` (safe): This is a legitimate Zod schema validation library file with no malicious patterns detected; the top-level code only sets up the module exports and freezes them.
- `v4/classic/schemas.js` (safe): The file is a standard Zod v4 schema definition module containing only type/validation logic, with no data exfiltration, credential harvesting, obfuscation, network calls, process spawning, or other malicious patterns.
- `v4/core/api.cjs` (safe): No malicious patterns detected
- `v4/core/api.js` (safe): Cleared by Jev triage; no further analysis needed
- `v4/core/checks.js` (safe): This is legitimate zod validation-check implementation code with no malicious patterns detected.

## Version ranges

1 of 4 scanned versions of zod are flagged: 4.6.5 (critical). The latest scanned version, 4.6.5, is critical risk. Only versions we have scanned are listed; unscanned versions between them are not covered.

- 4.6.5 (`4.6.5`): critical (Dynamic code execution +4 more)
- 3.25.76 – 4.1.13 (`>=3.25.76 <=4.1.13`): medium (Dynamic code execution +2 more)
- 3.23.8 (`3.23.8`): not scanned
- 3.22.4 (`3.22.4`): clean
- Flagged file `v4/core/checks.cjs` (critical) present in 4.6.5
- Flagged file `v4/core/doc.cjs` (critical) present in 4.6.5; finding IDs `NPS-9534A8F558A8`, `NPS-22B097E9EAFF`, `NPS-ADAE75B39B3B`

## Scanned versions

- [4.6.5](https://security.togoder.click/npm/zod@4.6.5): critical, 2026-10-06T14:25:39.000Z
- [4.1.13](https://security.togoder.click/npm/zod@4.1.13): medium, 2026-10-04T16:54:46.000Z
- [3.25.76](https://security.togoder.click/npm/zod@3.25.76): medium, 2026-10-04T16:54:47.000Z
- [3.22.4](https://security.togoder.click/npm/zod@3.22.4): safe, 2026-10-04T16:54:43.000Z

AI analysis is guidance, not a guarantee. Methodology: https://security.togoder.click/methodology
