Forge
Keep, but not for new work. 8th of 10 cryptography and password hashing.
Forge (node-forge) is an old pure-JavaScript toolkit for X.509 certificates, PKCS formats, RSA and a TLS client. It is still maintained, but in 2025–2026 it had a long series of signature-forgery and denial-of-service advisories, and its main dependents are moving to Web Crypto-based libraries. Keep it where it already runs and stay on the latest version. For new work, pick Web Crypto or node:crypto, or @peculiar/x509 or PKI.js for certificates.
Best for: Existing codebases that need pure-JS PKCS#12, X.509 or legacy TLS handling where native Web Crypto or node:crypto cannot be used.
Scores
Overall4.9
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 3.5, likely 2.5 to 4.5
Forge still runs in a huge number of installs and is maintained. But its record of serious verification bugs, its lack of types, its pure-JS speed and its loss of ground make it a poor pick for new work. Native Web Crypto and node:crypto, @peculiar/x509 or PKI.js for certificates, and node-argon2 or bcrypt for passwords do the job better. Keep it where it runs, on 1.4.3 or later.
- github.com/digitalbazaar/forge/blob/main/CHANGELOG.md: Repeated HIGH-severity fixes in 2025 and 2026.
- npm downloads ratio: 2.16 against the 4.1 median.
- app.unpkg.com/selfsigned@5.2.0/files/CHANGELOG.md: The ecosystem is moving to Web Crypto-based libraries.
GPT-6.2 Sol: 6.3, likely 5.2 to 7.4
Forge is a good fit when certificate formats or PKCS#12 bundles are central to the project. Web Crypto covers routine signing and encryption, and node-argon2 is a stronger fit for password storage on Node.js. Recent patches support continued use, while recurring verification fixes and slower relative adoption reduce confidence in Forge as a general choice for new projects.
- github.com/vbuch/node-signpdf: Shows a concrete workflow that benefits from Forge’s format support.
- nodejs.org/api/webcrypto.html: Documents built-in alternatives for common primitives.
- github.com/ranisalt/node-argon2: Offers Argon2id hashing and password verification.
- github.com/digitalbazaar/forge/blob/main/CHANGELOG.md: Shows active patching and recurring verification fixes.
- npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo; medianDownloadsRatio: Download growth trails the catalog baseline.
Needed by many4.4
How many developers need a tool for this job?
Claude Opus 5.5: 4.0, likely 3.0 to 5.0
Few developers work with PKI and certificates directly, and that is forge's main job. It does not hash passwords, which is half of the category's job. Most signing and encryption needs are now met by the built-in Web Crypto and node:crypto.
- github description: It describes itself as a TLS and crypto toolkit, not a password hasher.
- npm-compare.com/zh-CN/crypto,node-forge,pem,pem-jwk: Recommends built-in crypto on the server and forge mainly for browser-side PKI.
GPT-6.2 Sol: 4.8, likely 3.6 to 6.0
Many web projects need password hashing, signatures, or encryption, and built-in crypto APIs cover many of those operations. Forge’s distinctive use is certificate and key-format interoperability across Node.js and browsers. Browser measurements capture only part of that demand, leaving the size of the niche uncertain.
- almanac.httparchive.org/en/2025/security: Measures browser use of cryptographic operations.
- nodejs.org/api/webcrypto.html: Documents built-in signing and encryption support.
- github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-node/docs/certificate-credentials.md: Shows a concrete need for programmatic PFX conversion.
Helps a lot5.4
How well does it do the job for those who need it?
Claude Opus 5.5: 4.0, likely 3.0 to 5.5
Forge has many features, but its verification code has had repeated correctness bugs. Through 2026 these included RSA PKCS#1 v1.5 forgery, a missing Ed25519 S < L check, ignored nameConstraints and basicConstraints bypasses. It has no bundled types and a dated CommonJS API, and pure-JS speed falls well behind native crypto. Open issues show it still accepts certificates that other tools reject as invalid.
- github.com/digitalbazaar/forge/blob/main/CHANGELOG.md: 1.4.0, 1.4.1 and 1.4.3 fixed many HIGH-severity verification flaws.
- github.com/digitalbazaar/forge/issues: Open issues report that it accepts malformed certificates and has PSS and CaStore limits.
- npm hasTypes: No bundled types; users need @types/node-forge.
GPT-6.2 Sol: 6.7, likely 5.6 to 7.7
Forge 1.4.3 has substantial X.509 and PKCS#12 support and examples for common signing and encryption operations. PKCS#7 verification throws an error, and TypeScript users rely on community declarations. An independent browser benchmark found slower RSA signing and decryption than its Wasm implementation. It tested Forge 1.3.0, so the current performance gap is uncertain.
- raw.githubusercontent.com/digitalbazaar/forge/v1.4.3/README.md: Documents supported formats, primitives, and usage examples.
- raw.githubusercontent.com/digitalbazaar/forge/v1.4.3/lib/pkcs7.js: Confirms the verification method is a stub.
- raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/master/types/node-forge/index.d.ts: Provides separately maintained TypeScript declarations.
- jocm.us/2025/JCM-V20N6-681.pdf: Compares an earlier Forge release with Wasm for browser RSA.
Holds up over time5.4
Will it still be a good choice in two years?
Claude Opus 5.5: 4.5, likely 3.0 to 6.0
Digital Bazaar still pushes commits (97 in the last year) and npm releases (6 versions), and security fixes arrive quickly. But 400 issues are open, an open issue asks whether the project will be kept alive, and there are no GitHub releases and no roadmap. The ecosystem is moving away from it: selfsigned v5 switched to @peculiar/x509 and PKI.js on top of native Web Crypto.
- github commitsLastYear: 97 commits; the latest npm version, 1.4.3, came out 2026-11-04.
- app.unpkg.com/selfsigned@5.2.0/files/CHANGELOG.md: selfsigned removed node-forge and moved to @peculiar/x509.
- github.com/digitalbazaar/forge/issues: Issue #1123 asks whether there is a plan to keep the project alive.
GPT-6.2 Sol: 6.3, likely 5.0 to 7.5
Forge recorded 97 commits and six npm versions in a year, with several recent security releases. A user-reported PFX regression was patched the next day, and 400 issues and 56 pull requests remain open. Digital Bazaar maintains the repository, and one maintainer tagged 1.4.3. Ongoing funding and release coverage across maintainers are unclear.
- github commitsLastYear, openIssues, openPullRequests: Shows recent activity and the size of the backlog.
- npm versionsLastYear, latestPublishedAt: Shows six package publishes despite the empty GitHub releases listing.
- github.com/digitalbazaar/forge/releases/tag/v1.4.3: Identifies the maintainer who tagged the latest version.
- github.com/digitalbazaar/forge/issues/1127: Records a PFX regression and its next-day patch.
- github.com/digitalbazaar/forge: Shows Digital Bazaar stewardship and a request for donations.
Used widely6.3
How many use it, and is that growing?
Claude Opus 5.5: 5.5, likely 4.0 to 7.0
Downloads are very high, at 218M per 4 weeks. But the year-over-year ratio is 2.16, well below the 4.1 median, so it is losing ground. Most installs come in as a dependency of other tools, such as dev-server certificate helpers and Google auth libraries, not from direct choice. The 3M dependent repos reflect those transitive lockfile entries.
- npm downloadsLast4Weeks: 218M now against 101M a year ago, a ratio of 2.16 against the 4.1 median.
- dependents: 3.0M repos but only 2,329 packages, which points to heavy transitive use.
- bluesky posts: Only 1 post in 24 months, so there is almost no current attention.
GPT-6.2 Sol: 7.0, likely 5.5 to 8.2
Forge leads the supplied peers in tracked dependent repositories at roughly 3.04 million, with 2,329 tracked dependent npm packages. Historical installs through tools such as webpack-dev-server make the share of direct choices uncertain. Four-week downloads grew 2.16 times year over year, below the 4.1 times baseline and behind the noble libraries and node-argon2. That points to declining relative adoption despite a large installed base.
- dependents repos, packages; peers dependentRepos: Shows the largest tracked repository footprint in the peer set.
- npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo; medianDownloadsRatio; peers: Shows slower growth than the catalog baseline and several peers.
- github.com/webpack/webpack-dev-server/issues/4351: Documents historical transitive use through selfsigned.
- github.com/jfromaniello/selfsigned: Documents selfsigned’s move away from Forge.
Vouched for5.3
Who stands behind it being good?
Claude Opus 5.5: 4.0, likely 2.5 to 5.5
Large tools have relied on it for years, which counts as past validation. Current independent signals point the other way: well-known dependents are dropping it, and its recent record is long lists of flaws found by outside researchers. It has no survey presence and no Hacker News coverage.
- kb.cert.org/vuls/id/725167: A CERT/CC note on node-forge signature forgery.
- app.unpkg.com/selfsigned@5.2.0/files/CHANGELOG.md: A major dependent replaced it.
- hackerNews stories: 0 stories.
GPT-6.2 Sol: 6.5, likely 5.3 to 7.6
The signpdf P12 signer uses Forge for detached PDF signatures, and Formbricks documents its use through SAML Jackson for certificate generation. Microsoft’s MSAL Node documentation gives a Forge example for PFX conversion. These examples establish trust for specific workflows, while the State of JavaScript tools survey provides no Forge-specific satisfaction data.
- github.com/vbuch/node-signpdf: Uses Forge for PKCS#12-backed PDF signatures.
- github.com/formbricks/formbricks/blob/main/pnpm-workspace.yaml: Documents certificate generation through SAML Jackson and pins 1.4.3.
- github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-node/docs/certificate-credentials.md: Shows Forge as a programmatic PFX conversion option.
- 2025.stateofjs.com/en-US/other-tools: Offers no Forge-specific satisfaction measure.
Safe4.7
How safe is it to depend on?
Claude Opus 5.5: 3.5, likely 2.5 to 5.0
It has 36 advisories, 28 of them in the last 24 months. Many were HIGH-severity signature-forgery and certificate-validation bypasses, which is serious for a crypto library. They were patched quickly, and it has no dependencies. Its Scorecard is 6.1, with Code-Review, Fuzzing, SAST and Pinned-Dependencies all at 0. The dual BSD-3-Clause or GPL-2.0 licence permits commercial use.
- advisories: 36 total, 28 in 24 months, five more published in November 2026.
- scorecard: 6.1 overall; Code-Review, Fuzzing and SAST each 0.
- nvd.nist.gov/vuln/detail/cve-2026-33894: RSA PKCS#1 v1.5 signature forgery, fixed in 1.4.0.
- npm dependencies: 0 runtime dependencies.
GPT-6.2 Sol: 5.8, likely 4.5 to 6.9
Version 1.4.3 patches the latest listed TLS and Ed25519 issues and a high-severity X.509 verification flaw. Forge has no runtime npm dependencies and offers a permissive BSD-3-Clause option alongside GPL-2.0. Repeated fixes to certificate and signature handling make timely upgrades important. OpenSSF scores code review, fuzzing, and workflow dependency pinning at zero, and the release signing check is unscored.
- npm dependencies, license: Zero runtime npm dependencies and a choice of BSD-3-Clause or GPL-2.0.
- scorecard score, checks: Scores 6.1 overall, with gaps in review, fuzzing, and pinning.
- github.com/digitalbazaar/forge/blob/main/CHANGELOG.md: Records the affected features and patch versions.
- github.com/digitalbazaar/forge/security/advisories/GHSA-3cc4-3294-vgjf: Confirms 1.4.3 patches a high-severity certificate validation issue.
- kb.cert.org/vuls/id/521113: CERT independently documents the earlier ASN.1 issue and its fix.
Good
- It covers a lot in one package with no dependencies: X.509, CSRs, PKCS#7 and #12, RSA, AES and a TLS client.
- It runs in pure JavaScript in both browsers and Node, without native bindings.
- It is still maintained: six npm versions came out in the last year, and the 2026 advisories were fixed quickly.
- Its dual BSD-3-Clause or GPL-2.0 licence lets you use it commercially under the BSD terms.
Bad
- About 28 advisories came out in 24 months, including several RSA and Ed25519 signature-forgery and certificate-chain bypass bugs.
- It ships no types of its own and uses an old CommonJS API, and pure-JS crypto is slow next to native Web Crypto.
- It is not a password-hashing library: it has PBKDF2 but no bcrypt or argon2.
- Major dependents such as selfsigned v5 have replaced it with @peculiar/x509 and PKI.js.
The numbers
- npm downloads, 4 weeks
- 218M ×2.2 in a year
- GitHub stars
- 5.4k
- Commits, 12 months
- 97
- npm version
- 1.4.3 Nov 2026
- Versions, 12 months
- 6
- Advisories, 24 months
- 28 of 36 ever
- OpenSSF Scorecard
- 6.1 out of 10, Nov 2026
- Licence
- (BSD-3-Clause OR GPL-2.0)
Read on 21 November 2026 from GitHub (digitalbazaar/forge), npm (node-forge), 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