crypto-js
Do not start with it. 10th of 10 cryptography and password hashing.
crypto-js is a pure-JavaScript library of hashes, HMAC, AES and PBKDF2. It is deprecated on npm, and its README says development has stopped in favour of the native crypto module. Its PBKDF2 defaults were weak until 4.2.0 and its 3.x random number generator was weak, with no release since 2023. Do not start new projects with it: use Web Crypto or node:crypto, or a maintained library such as noble-hashes.
Best for: Nobody starting new work. Keep it only in legacy code that you plan to move to Web Crypto, node:crypto or noble-hashes.
Scores
Overall1.7
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 1.5, likely 0.5 to 2.5
The project is deprecated, unmaintained and has a critical security history. Native Web Crypto, node:crypto and maintained peers such as noble-hashes, node-argon2 and libsodium.js do the job better. It belongs only in legacy code that is being migrated.
- npm deprecated: Officially discontinued.
- peers: noble-hashes and node-argon2 are active and growing faster.
- github.com/brix/crypto-js: The README says to use native crypto.
GPT-6.2 Sol: 1.8, likely 0.8 to 2.9
CryptoJS 4.2.0 still serves legacy integrations, but discontinued maintenance and weak passphrase defaults rule it out for new projects. Web Crypto covers authenticated encryption and signatures, and node-argon2 supplies Argon2id for password storage in Node.js. The upper end of the range reflects projects that must work with an existing ciphertext format.
- github.com/brix/crypto-js: Confirms discontinuation and documents legacy cryptographic APIs.
- github.com/brix/crypto-js/issues/534: Identifies the weak passphrase defaults that remain in 4.2.0.
- nodejs.org/api/webcrypto.html: Documents native authenticated encryption and digital signatures.
- github.com/ranisalt/node-argon2: Documents Argon2id password hashing and verification.
- cryptojs.gitbook.io/docs: Documents the default OpenSSL-compatible ciphertext format.
Needed by many5.2
How many developers need a tool for this job?
Claude Opus 5.5: 5.0, likely 4.0 to 6.0
Many web and server apps need to hash and encrypt data. But crypto-js offers only general primitives, with no modern password hashing. Native APIs now cover most of the same need, so the group that needs this library in particular is moderate.
- category.job: The job is password hashing, signing and encryption.
- github.com/brix/crypto-js: The README says native crypto now covers this job.
GPT-6.2 Sol: 5.4, likely 4.1 to 6.8
Password storage, request authentication, and encryption matter to many web and server teams. CryptoJS runs in browsers and Node.js, but built-in APIs cover much of its common use, and its legacy formats are most relevant to teams with existing data. There is little direct survey evidence on how many JavaScript developers need this particular mix.
- github.com/brix/crypto-js: Documents browser and Node.js support and the available algorithms.
- github.com/e18e/module-replacements/blob/main/docs/modules/crypto-js.md: Documents native replacements and notes that some legacy algorithms are omitted.
- 2025.stateofjs.com/en-US/libraries: The survey's library results provide no CryptoJS-specific measure.
Helps a lot3.4
How well does it do the job for those who need it?
Claude Opus 5.5: 2.5, likely 1.5 to 4.0
It works for common hashes and AES. But its defaults have been unsafe: PBKDF2 used SHA1 with one iteration before 4.2.0. It has no types, no authenticated encryption such as AES-GCM, and no memory-hard password hashing. Native crypto and noble-hashes do the same job better and faster.
- npm hasTypes: Ships no types.
- security.snyk.io/vuln/SNYK-JS-CRYPTOJS-6028119: Weak PBKDF2 defaults before 4.2.0.
- sentinelone.com/vulnerability-database/cve-2023-46233: Defaulted to SHA1 with a single iteration.
GPT-6.2 Sol: 4.2, likely 3.1 to 5.5
Version 4.2.0 provides straightforward synchronous hashing, HMAC, and legacy AES, but lacks AES-GCM, public-key signatures, and Argon2id. TypeScript users install separate declarations, and the README's passphrase example makes weak defaults easy for developers and coding agents to copy. A user reported a malformed UTF-8 error when decrypting stored data after upgrading. An independent benchmark found slower AES-CBC than Forge and Web Crypto, although it tested CryptoJS 4.0.0 on an older Node.js release.
- github.com/brix/crypto-js: Lists supported primitives and shows the default passphrase example.
- github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/crypto-js/index.d.ts: Provides the separately maintained TypeScript declarations.
- github.com/brix/crypto-js/issues/534: Reports weak defaults in the documented AES example.
- github.com/brix/crypto-js/issues/478: Reports a decryption error after upgrading to 4.2.0.
- github.com/mnasyrov/cryptobench-js: Measures CryptoJS 4.0.0 against Forge and Web Crypto on Node.js 13.
Holds up over time0.7
Will it still be a good choice in two years?
Claude Opus 5.5: 0.5, likely 0.0 to 1.5
The maintainers discontinued it, and npm marks it deprecated. There have been no commits since August 2024 and no release since October 2023, with 260 open issues. The ecosystem is moving to native crypto, so the outlook is clear and the range is narrow.
- npm deprecated: Deprecated: no longer maintained.
- github commitsLastYear: 0 commits, 0 releases.
- deploy-preview-194--shiny-salamander-b16dd2.netlify.app/docs/replacements/crypto-js: The e18e replacements guide points to node:crypto and Web Crypto.
GPT-6.2 Sol: 0.8, likely 0.2 to 1.6
Upstream explicitly ended maintenance, and the catalog recorded no commits or npm releases in the past year. The documented AES defaults have an open report, while peers such as node-argon2 and libsodium.js continue to ship updates. The explicit discontinuation makes the two-year outlook unusually clear.
- github.com/brix/crypto-js: Upstream announces the end of maintenance and points users to native crypto.
- github.commitsLastYear, npm.latestPublishedAt, npm.versionsLastYear: Zero recent commits or package versions, with the last publish in October 2023.
- github.com/brix/crypto-js/issues/534: The report on weak passphrase defaults remains open.
- peers node-argon2 and libsodium.js: Both peers published in 2026 and had dozens of commits in the past year.
Used widely5.8
How many use it, and is that growing?
Claude Opus 5.5: 5.5, likely 4.5 to 7.0
It has 107M downloads a month and about 164k dependent repos, so it is still very present. But its ratio of about 2.6 is well below the 4.1 median, so it is losing share. Most installs come from old code and transitive dependencies, not from new choices.
- npm downloadsLast4Weeks: 107M now against 41.8M a year ago, a ratio of 2.56.
- medianDownloadsRatio: The median is 4.1, so it is losing ground.
- dependents.repos: 163,892 repos.
GPT-6.2 Sol: 6.1, likely 4.9 to 7.3
The collector found about 164,000 dependent repositories and 11,900 dependent packages, a substantial installed base below Forge and TweetNaCl.js by repository count. Four-week npm downloads rose from 41.8 million to 107.0 million, or 2.56 times, below the 4.1 times catalog baseline and the 7.78 times growth of noble-hashes. That points to a falling share of installs, while CI, transitive installs, and uncounted CDN usage make new choices hard to estimate.
- dependents.repos, dependents.packages, peers Forge and TweetNaCl.js: Shows a sizable dependency footprint below the largest peers.
- npm.downloadsLast4Weeks, npm.downloadsSame4WeeksYearAgo, medianDownloadsRatio, peers noble-hashes: Downloads grew more slowly than the catalog baseline and noble-hashes.
- cdnjs.com/libraries/crypto-js: Distributes browser builds outside npm.
Vouched for2.8
Who stands behind it being good?
Claude Opus 5.5: 1.5, likely 0.5 to 3.0
No current independent source endorses it. Its own maintainers and the e18e replacement guide recommend moving off it. Its 16k stars reflect history, not current approval.
- hackerNews/bluesky: No current discussion.
- github.com/brix/crypto-js: The maintainers recommend native crypto instead.
GPT-6.2 Sol: 4.1, likely 2.8 to 5.4
Supabase Studio still lists CryptoJS 4.2.0 as an application dependency, which is a concrete sign of use. Postman formerly bundled it and now directs users to Web Crypto. The available independent benchmark covers an older release, and State of JavaScript provides no CryptoJS satisfaction data, so current quality evidence is limited.
- github.com/supabase/supabase/blob/master/apps/studio/package.json: Supabase Studio declares CryptoJS 4.2.0 as an application dependency.
- learning.postman.com/docs/tests-and-scripts/write-scripts/postman-sandbox-reference/pm-require: Postman marks its built-in CryptoJS module unsupported and directs users to Web Crypto.
- github.com/mnasyrov/cryptobench-js: Independent comparison covers the older 4.0.0 release.
- 2025.stateofjs.com/en-US/libraries: Provides no CryptoJS satisfaction or retention result.
Safe2.4
How safe is it to depend on?
Claude Opus 5.5: 2.0, likely 1.0 to 3.5
It has three advisories, two of them critical. The 2026 RNG advisory affects old 3.x versions and led to real wallet losses. Weak PBKDF2 defaults were fixed only in 4.2.0. No future flaw will be fixed, and the Scorecard is 2.2. It has no dependencies, and the MIT licence is fine.
- advisories: Three advisories, two critical, one in the last 24 months.
- advisories.gitlab.com/npm/crypto-js/CVE-2026-71851: CVE-2026-71851: weak RNG entropy before 4.0.0.
- scorecard.score: 2.2, Maintained 0.
- npm dependencies: 0 dependencies.
GPT-6.2 Sol: 2.7, likely 1.5 to 4.0
The MIT-licensed package has zero runtime dependencies and one listed npm maintainer. Version 4.2.0 contains fixes for all three listed advisories, including the entropy flaw fixed in 4.0.0 and publicly disclosed in 2026. Its documented AES passphrase path still defaults to unauthenticated CBC and a single MD5 iteration for key derivation. The 2.2 OpenSSF Scorecard, including zeroes for maintenance, security policy, and fuzzing, leaves little confidence in future fixes.
- npm.license, npm.dependencies: MIT license and zero runtime dependencies.
- humanloads.dev/crypto-js: Reports one maintainer listed in npm metadata.
- github.com/advisories/GHSA-rg76-677x-56q9: The 2026 entropy advisory identifies 4.0.0 as the patched version.
- github.com/advisories/GHSA-xwcq-pm8m-c4vf: Weak PBKDF2 defaults were fixed in 4.2.0.
- github.com/advisories/GHSA-3w3w-pxmm-2w2j: The separate random-number flaw affected 3.2.0 and was patched in 3.2.1.
- github.com/brix/crypto-js/issues/534: Documents unauthenticated CBC and weak passphrase derivation in the current AES example.
- scorecard.score, scorecard.checks: Scores 2.2 overall, with zeroes for maintenance, security policy, and fuzzing.
Good
- It has no dependencies and works the same in browsers and Node.
- Its API is simple and covers common hashes, HMAC, AES and encodings.
- It is MIT licensed and familiar from a very large body of existing code.
Bad
- It is officially discontinued and marked deprecated on npm, with no commits or releases since 2023.
- It has critical advisories: PBKDF2 defaults were far too weak before 4.2.0, and the 3.x RNG had weak entropy that led to drained crypto wallets.
- It ships no TypeScript types, is slower than native crypto, and has no bcrypt, scrypt or argon2.
- Its OpenSSF Scorecard is 2.2, with no security policy, no branch protection and a Maintained score of 0.
The numbers
- npm downloads, 4 weeks
- 107M ×2.6 in a year
- GitHub stars
- 16k
- Commits, 12 months
- 0
- npm version
- 4.2.0 Oct 2023
- Versions, 12 months
- 0
- Advisories, 24 months
- 1 of 3 ever
- OpenSSF Scorecard
- 2.2 out of 10, Nov 2026
- Licence
- MIT
Read on 21 November 2026 from GitHub (brix/crypto-js), npm (crypto-js), OSV and the OpenSSF Scorecard.
Cryptography and password hashing
- 8.2noble-curves
- 8.1noble-hashes
- 7.8node-argon2
- 7.4libsodium.js
- 6.5hash-wasm
- 6.2bcrypt.js
- 5.4node.bcrypt.js
- 4.9Forge
- 4.5TweetNaCl.js
- 1.7crypto-js