Mongoose
A strong pick. 3rd of 10 ORMs and query builders.
Mongoose is the long-standing schema and model layer (ODM) for MongoDB in Node.js. It is actively maintained by paid staff at Automattic and is still the default pick when your database is MongoDB. Its TypeScript types are looser than Prisma's or Drizzle's, and its share of new installs is growing more slowly than the category's.
Best for: Node.js teams on MongoDB that want schemas, validation, middleware, population and full access to MongoDB queries and aggregations.
Scores
Overall7.8
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 7.5, likely 6.5 to 8.0
If your database is MongoDB, Mongoose is still the strongest and best-maintained choice in this category. Because it is MongoDB-only, it is a strong pick for a named kind of project rather than the category default. Looser TypeScript types and a recent run of query-sanitizing advisories keep it below 8.
- github commitsLastYear: Very active maintenance
- pkgpulse.com/guides/mongoose-vs-prisma-2026: Recommended for MongoDB over Prisma
- prosopo.io/blog/mongoose: TypeScript weaknesses reported by users
- advisories last24Months: Recent security fixes
GPT-6.2 Sol: 8.0, likely 6.9 to 8.9
Mongoose is a strong choice for a new MongoDB service that benefits from document schemas, hooks, and transactions. Frequent maintenance and integrations with NestJS and Payload CMS support that recommendation. MikroORM is a credible peer when a team wants the same ORM across MongoDB and SQL. TypeScript gaps, repeated security fixes, and slower relative adoption growth keep the recommendation below the category's top tier.
- github.com/Automattic/mongoose/releases/tag/9.12.3: Current stable version continues to fix modeling and query edge cases.
- docs.nestjs.com/data/mongodb: Maintained integration with an established Node.js framework.
- payloadcms.com/docs/database/mongodb: A widely used CMS builds its MongoDB adapter on Mongoose.
- mikro-orm.io/docs/usage-with-mongo: MikroORM also offers MongoDB modeling and transactions alongside its SQL drivers.
- prosopo.io/blog/mongoose: First-hand report of TypeScript gaps in application code.
- npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo, medianDownloadsRatio: Install growth trails the catalog median despite a large installed base.
- advisories recent, scorecard checks: Serious recent advisories and weaker workflow controls temper the recommendation.
Needed by many4.4
How many developers need a tool for this job?
Claude Opus 5.5: 5.0, likely 4.0 to 6.0
Every project needs to read and write a database, but Mongoose serves only MongoDB users. MongoDB is the most-used document database among JavaScript developers, yet it is a minority next to Postgres, MySQL and SQLite. That makes Mongoose clearly narrower than SQL-agnostic peers such as Prisma or Drizzle.
- github description: MongoDB object modeling only
- pkgpulse.com/guides/mongoose-vs-prisma-2026: Scope limited to MongoDB use cases
- Stack Overflow developer survey: MongoDB is used by roughly a quarter of developers, behind SQL databases
GPT-6.2 Sol: 3.8, likely 2.8 to 4.9
Database access is common in JavaScript backends, and Mongoose serves the subset that uses MongoDB and wants an application-level schema. MongoDB was used by 19% of database respondents in the 2026 Stack Overflow survey. The share of JavaScript and TypeScript teams that want an object modeling layer on top of MongoDB is less clear.
- survey.stackoverflow.co/2026/technology/data/databases: MongoDB was seventh among surveyed databases.
- 2025.stateofjs.com/en-US/usage: Front-end development remained the most common JavaScript use.
- mongoosejs.com/docs/guide.html: The schema and model APIs are built around MongoDB collections.
Helps a lot8.2
How well does it do the job for those who need it?
Claude Opus 5.5: 8.0, likely 7.0 to 9.0
For MongoDB it is the most complete tool. Independent comparisons find Prisma lacks embedded documents and aggregation pipelines, and Mongoose has both, along with validation, middleware and population. Version 9 removed callbacks and tightened its TypeScript types. Type inference is still weaker than schema-first peers, and one team reports schema and type mismatches that reached production.
- pkgpulse.com/guides/mongoose-vs-prisma-2026: Recommends Mongoose for MongoDB; Prisma lacks embedded docs and aggregation
- prosopo.io/blog/mongoose: User report of loose TypeScript checks causing data inconsistencies
- mongoosejs.com/docs/migrating_to_9.html: v9 removes callbacks and adds stricter TS types
- npm hasTypes: Bundled TypeScript types
GPT-6.2 Sol: 8.3, likely 7.1 to 9.2
Version 9.12.3 offers mature MongoDB modeling, with casting, validation, middleware, population, and transactions. Its current guides give coding agents clear examples for routine queries and writes, while update validation and schema typing still need careful review. Prosopo reported runtime bugs that TypeScript missed, and a benchmark by the Mongoat author found slower bulk inserts and multi-document reads with Mongoose 9.7.4 defaults. Performance varies by workload, and agent-generated code was not tested directly.
- github.com/Automattic/mongoose/releases/tag/9.12.3: Current stable release fixes query casting and nested update validation.
- mongoosejs.com/docs/guide.html: Documents schema, model, and middleware behavior.
- mongoosejs.com/docs/validation.html: Query updates require explicit opt-in to validation.
- mongoosejs.com/docs/typescript/schemas.html: Documents schema inference and its limits.
- prosopo.io/blog/mongoose: A production team reports schema and TypeScript mismatches.
- iamcalegari.github.io/mongoat/explanation/benchmarks: Reproducible benchmark found slower bulk operations and similar results in most other tests.
Holds up over time8.4
Will it still be a good choice in two years?
Claude Opus 5.5: 8.5, likely 7.5 to 9.0
The project has 2,132 commits, 79 releases and a release one day before the read date. About 11k issues are closed against 166 open. Automattic employs the lead maintainer, and older major lines get backported fixes. Major versions do bring breaking changes, such as dropping callback middleware in v9, but each comes with migration guides.
- github commitsLastYear / releasesLastYear: 2132 commits, 79 releases
- github openIssues / closedIssues: 166 open vs 11147 closed
- mongoosejs.com/docs/version-support.html: Older majors still supported
- Automattic sponsorship: Lead maintainer is paid by Automattic
GPT-6.2 Sol: 8.2, likely 7.0 to 9.2
Mongoose shipped 79 GitHub releases in a year, maintains several major lines, and closed a recent validation bug within five days. Outside contributors supply fixes, and the project has sponsorship and commercial support channels. Recent releases are concentrated around one lead maintainer, and version 9 removed callback-style pre middleware and raised the Node.js minimum.
- github commitsLastYear, releasesLastYear, contributors, latestRelease: 2,132 commits, 79 releases, and 1,115 historical contributors.
- github.com/Automattic/mongoose/releases: One lead maintainer handles most visible recent releases across supported lines.
- github.com/Automattic/mongoose/issues/16707: Reported November 13, closed November 18, and fixed in 9.12.3.
- mongoosejs.com/docs/version-support.html: Older major lines have published support and end-of-life dates.
- github.com/Automattic/mongoose/blob/9.12.3/.github/FUNDING.yml: Lists GitHub Sponsors, Open Collective, and Tidelift.
- mongoosejs.com/docs/migrating_to_9.html: Documents middleware changes and the Node.js 20.19 minimum.
Used widely7.8
How many use it, and is that growing?
Claude Opus 5.5: 8.0, likely 7.0 to 8.5
Its 833k dependent repositories are four times as many as any peer's, and it has 36.5M downloads every four weeks. Downloads grew 2.6x in a year against a 4.1x median, while Drizzle, Kysely and Prisma grew much faster. Mongoose is widely used but losing share of new choices.
- dependents repos: 833,560 repos, highest in the category
- npm downloadsLast4Weeks vs downloadsSame4WeeksYearAgo: 36.5M vs 14.3M, ratio 2.56 below the 4.1 median
- github stars: 27.4k stars
GPT-6.2 Sol: 7.6, likely 6.5 to 8.7
Ecosyste.ms found about 834,000 dependent repositories and 13,800 dependent packages, the strongest recorded repository footprint in this peer group. Four-week npm downloads rose from 14.3 million to 36.5 million, or 2.56 times, below the 4.1 catalog median and well behind Prisma, Drizzle, and Kysely. That suggests a loss of relative momentum, while automated installs, existing codebases, and limited social coverage make new-project adoption hard to estimate.
- dependents repos, packages: 833,560 indexed repositories and 13,842 indexed packages.
- npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo, medianDownloadsRatio: 2.56 times year-over-year growth against a 4.1 catalog median.
- peers: The largest indexed dependent repository count, with slower download growth than several peers.
- github stars, bluesky posts: 27,451 stars and zero Bluesky posts captured by the collector.
Vouched for7.1
Who stands behind it being good?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
Mongoose is the standard MongoDB layer in MERN tutorials and production apps. Independent comparisons still recommend it over Prisma for MongoDB. Developer attention is low, with 0 Bluesky posts and one critical HN story. Survey satisfaction for ORMs favours newer SQL tools.
- pkgpulse.com/guides/mongoose-vs-prisma-2026: Independent verdict favours Mongoose for MongoDB
- prisma.io/docs/guides/v7/switch-to-prisma-orm/from-mongoose: Prisma v7 lacked MongoDB support, so Mongoose remains the main option
- hackerNews / bluesky: One negative HN story, 0 Bluesky posts
GPT-6.2 Sol: 7.1, likely 5.9 to 8.3
NestJS maintains a dedicated integration, and Payload CMS builds its MongoDB adapter on Mongoose. The Mongoat benchmark found comparable throughput in most tested operations, while Prosopo reported that type gaps prompted it to look for a replacement. Recent Mongoose-specific satisfaction data and broad production comparisons are sparse.
- docs.nestjs.com/data/mongodb: NestJS maintains and documents a dedicated Mongoose module.
- payloadcms.com/docs/database/mongodb: Payload CMS exposes Mongoose models through its MongoDB adapter.
- iamcalegari.github.io/mongoat/explanation/benchmarks: An alternative ODM's author published the comparison and its reproduction method.
- prosopo.io/blog/mongoose: A production team describes type-related bugs and plans to move away.
Safe6.3
How safe is it to depend on?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
The package has 9 advisories in 24 months. They include a critical sanitizeFilter bypass on countDocuments, a high connection-level sanitizeFilter flaw and prototype-pollution bugs. Fixes shipped across the 6.x to 9.x lines. The MIT licence and 7 dependencies help, but the OpenSSF Scorecard is 6.9, with weak token permissions and dependency pinning.
- advisories last24Months: 9 advisories, including critical and high
- corgea.com/advisories/vulnerabilities/CVE-2026-125119: Connection-level sanitizeFilter flaw, fixed in 6.13.12, 7.8.13, 8.24.7, 9.11.4
- scorecard: 6.9 overall; Token-Permissions 0, Pinned-Dependencies 3
- npm dependencies: 7 dependencies, MIT licence
GPT-6.2 Sol: 6.5, likely 5.3 to 7.6
Version 9.12.3 includes fixes for all five November advisories in the bundle, including a critical query-filter flaw, and the project backported fixes across four major lines. The package is MIT-licensed and has seven direct dependencies. The OpenSSF score of 6.9 reflects weak workflow token permissions, dependency pinning, and fuzzing. Recent GitHub releases are concentrated around one maintainer, and npm publishing permissions and provenance remain unverified.
- advisories recent, last24Months: Nine advisories in 24 months, including several serious November disclosures.
- github.com/advisories/GHSA-pcrw-h46h-c93h: Critical filter issue had patches for four major lines by disclosure.
- github.com/advisories/GHSA-gg4r-jv3p-qx3c: High-severity connection-level filter issue was fixed in 9.11.4 and backported.
- github.com/Automattic/mongoose/releases/tag/9.11.4: The 9.x patch release preceded the November disclosures.
- scorecard score, checks: 6.9 overall, with zero for token permissions and fuzzing and three for dependency pinning.
- npm license, dependencies: Permissive MIT licence and seven direct dependencies.
- github.com/Automattic/mongoose/releases: Public GitHub releases show who tagged recent versions.
Good
- It covers MongoDB fully: embedded documents, aggregation pipelines, discriminators, population and middleware hooks.
- Maintenance is very active, with about 2,100 commits and 79 releases in the last year and the latest release one day before the read date.
- It has by far the largest dependent base in the category, with over 830k GitHub repositories, so examples and AI-agent knowledge are plentiful.
- Security fixes are backported to the 6.x, 7.x and 8.x lines, not only the newest major.
Bad
- It works only with MongoDB, so it does not serve the SQL majority of the category.
- TypeScript types were added on top of a JavaScript codebase, and users report loose checks that let schema mismatches reach production.
- Nine advisories in 24 months include critical and high sanitizeFilter bypasses and prototype-pollution bugs.
- Downloads grew 2.6x in a year, below the 4.1x median, so it is losing share of new projects.
The numbers
- npm downloads, 4 weeks
- 36M ×2.6 in a year
- GitHub stars
- 27k
- Commits, 12 months
- 2.1k
- npm version
- 9.12.3 Nov 2026
- Versions, 12 months
- 85
- Advisories, 24 months
- 9 of 14 ever
- OpenSSF Scorecard
- 6.9 out of 10, Oct 2026
- Licence
- MIT
Read on 21 November 2026 from GitHub (Automattic/mongoose), npm (mongoose), OSV and the OpenSSF Scorecard.
ORMs and query builders
- 8.1Drizzle ORM
- 8.0Kysely
- 7.8Mongoose
- 7.5Prisma
- 7.3MikroORM
- 6.7ZenStack
- 6.4TypeORM
- 5.9Knex.js
- 5.3Objection.js
- 5.0Sequelize