Skip to content
vetkitChecksChangelogDocumentation

vetkit.js.code-injection.request-module-load

Request input decides which module or script is loaded or compiled (require/import/vm.Script). An attacker can load arbitrary files as code.

Last updated:

Suite: Security

javascript, typescript

Request input decides which module or script is loaded or compiled (require/import/vm.Script). An attacker can load arbitrary files as code.

Category: SECURITY · Engine rule severity: ERROR

How to fix it

Look the requested name up in a fixed map of modules/plugins instead of loading a path built from input.

References

Source: packages/engine/rules/sast/javascript.yml.

Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.