# crypto-js: 1.7 out of 10

Do not start with it. 10th of 10 in [Cryptography and password hashing](https://elestia.ai/opensource/crypto/index.md).

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

- **Overall: 1.7** (likely 0.7 to 2.7)
  - Claude Opus 5.5 (1.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.
  - GPT-6.2 Sol (1.8): 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.
- **Needed by many: 5.2** (likely 4.1 to 6.4)
  - Claude Opus 5.5 (5.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.
  - GPT-6.2 Sol (5.4): 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.
- **Helps a lot: 3.4** (likely 2.3 to 4.8)
  - Claude Opus 5.5 (2.5): 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.
  - GPT-6.2 Sol (4.2): 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.
- **Holds up over time: 0.7** (likely 0.1 to 1.6)
  - Claude Opus 5.5 (0.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.
  - GPT-6.2 Sol (0.8): 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.
- **Used widely: 5.8** (likely 4.7 to 7.2)
  - Claude Opus 5.5 (5.5): 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.
  - GPT-6.2 Sol (6.1): 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.
- **Vouched for: 2.8** (likely 1.7 to 4.2)
  - Claude Opus 5.5 (1.5): 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.
  - GPT-6.2 Sol (4.1): 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.
- **Safe: 2.4** (likely 1.3 to 3.8)
  - Claude Opus 5.5 (2.0): 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.
  - GPT-6.2 Sol (2.7): 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.

## 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

- Downloads, 4 weeks: 107M
- In a year: ×2.6
- GitHub stars: 16k
- Commits, 12 months: 0
- Last npm release: Oct 2023
- Advisories, 24 months: 1
- Licence: MIT
- GitHub: https://github.com/brix/crypto-js
- npm: https://www.npmjs.com/package/crypto-js

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
