Togoder security

npm package security report

iron-webcrypto npm package: is it safe?

Risky patterns found that deserve a look.

Needs review Version 1.2.1 Files reviewed 3 Size 22.8 KB Scanned

Summary

Togoder Security scanned the npm package iron-webcrypto@1.2.1 on Oct 4, 2026. An AI review of 3 source files produced 1 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
1
medium
1
low

Findings 2

medium

weak cryptography (SHA-1 in PBKDF2)

NPS-3ACF378AE9E6

PBKDF2 is invoked with the hardcoded hash 'SHA-1' in generateKey. Although this module appears to be a faithful re-implementation of @hapi/iron's browser-compatible sealing/unsealing logic, using SHA-1 inside PBKDF2 is cryptographically weak and may be flagged by security scanners. Note also that the default iterations is 1, which is far too low for password-based key derivation.

dist/index.js
low

non-constant-time behavior / timing side-channel in fixedTimeComparison

NPS-E6D141FC26F1

fixedTimeComparison short-circuits when lengths differ (setting b = a) but the loop itself is constant-time over a.length. This is similar to the well-known hapi/iron implementation. No data exfiltration or malicious behavior is present; the loop is intended to be constant-time, though JS engines make true constant-time guarantees impossible.

dist/index.js

Files reviewed

FileVerdictWhat the reviewer saw
dist/index.js medium This is a browser/WebCrypto reimplementation of @hapi/iron seal/unseal (base64url, AES-CBC/CTR, HMAC, PBKDF2) with no exfiltration, shell, eval, or credential-harvesting code, but it uses SHA-1 in PBKDF2 and a default iteration count of 1, which are cryptographic weaknesses.
dist/example.js safe No malicious patterns detected; the code demonstrates legitimate use of iron-webcrypto for sealing and unsealing data with no exfiltration, obfuscation, or suspicious behavior.
dist/index.cjs safe No malicious patterns detected; the code implements a legitimate cryptographic sealing utility with no data exfiltration, credential harvesting, obfuscation, or other security red flags.

Scanned versions of iron-webcrypto

VersionVerdictFilesScanned
1.2.1 Needs review 3 Oct 4, 2026

Frequently asked questions

Is iron-webcrypto safe to use?

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

Does iron-webcrypto contain malware?

No malware was identified in iron-webcrypto@1.2.1 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 iron-webcrypto checked?

Togoder Security downloaded the published npm package and had an AI model read its 3 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 iron-webcrypto 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 iron-webcrypto@1.2.1, cost nothing.

Related security reports