Togoder security

npm package security report

real-require npm package: is it safe?

Risky patterns found that deserve a look.

Needs review Version 0.2.0 Files reviewed 1 Size 381 B Scanned

Summary

Togoder Security scanned the npm package real-require@0.2.0 on Oct 4, 2026. An AI review of 1 source file produced 3 medium, 1 low severity findings. The overall verdict is medium: the findings flag risky but common patterns (dynamic code, unsafe defaults, broad file or network access) rather than confirmed malware.

0
critical
0
high
3
medium
1
low

Findings 4

medium

Dynamic code execution

NPS-8B271C62E3FF

Uses new Function('modulePath', 'return import(modulePath)') to construct a dynamic import at runtime. While this is a known pattern to bypass bundlers like webpack, it enables arbitrary module loading if modulePath is attacker-controlled.

src/index.js:4
medium

Dynamic module loading

NPS-84FA83E8285C

realImport accepts an arbitrary modulePath and dynamically imports it. If callers pass untrusted input, this could lead to loading of malicious modules. The use of computed module paths bypasses static analysis and bundler safeguards.

src/index.js:4
medium

Dynamic module loading

NPS-7C5095159EA0

realRequire falls back to global require(modulePath) with an arbitrary caller-supplied path, again allowing dynamic loading of any module reachable by the Node resolver.

src/index.js:11
low

Bundler/security boundary bypass

NPS-CE44DB92C896

References __non_webpack__require__ and constructs a Function-based import specifically to escape webpack's static analysis. This pattern is legitimate for some libraries but is also commonly abused to hide module-loading behavior from security tooling.

src/index.js

Files reviewed

FileVerdictWhat the reviewer saw
src/index.js medium The file is a small utility exposing dynamic import/require wrappers; no exfiltration, process spawning, or credential harvesting is present, but the new Function-based dynamic import and computed module loading warrant caution if callers pass untrusted paths.

Affected version ranges

None of the 2 scanned versions of real-require are flagged high or critical. The latest scanned version, 0.2.0, is medium risk. Only versions we have scanned are listed; unscanned versions between them are not covered.

0.1.00.2.0
VersionsVerdictCountRangeTop findings
0.1.0 โ€“ 0.2.0 Needs review 2 >=0.1.0 <=0.2.0 Dynamic code execution; Dynamic module loading

Full list, including published versions not scanned yet: version ranges API.

Scanned versions of real-require

VersionVerdictFilesScanned
0.2.0 Needs review 1 Oct 4, 2026
0.1.0 Needs review 1 Oct 4, 2026

Frequently asked questions

Is real-require safe to use?

No confirmed malware was found in real-require@0.2.0, but the review flagged 3 medium, 1 low severity findings for risky patterns worth checking before you rely on it.

Does real-require contain malware?

No malware was identified in real-require@0.2.0 when Togoder Security scanned it on Oct 4, 2026. A new version can still introduce malicious code, so scan the exact versions in your lockfile.

How was real-require checked?

Togoder Security downloaded the published npm package and had an AI model read its 1 source files, looking for install scripts, credential access, network exfiltration, obfuscation, backdoors and crypto-wallet theft. The results are cached by file hash and shown here.

How do I scan real-require together with the rest of my dependencies?

Upload your lockfile at https://security.togoder.click/scan or call the API documented at https://security.togoder.click/api-docs. Files that have already been scanned, like the ones in real-require@0.2.0, cost nothing.

Related security reports