Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

fix(deps): update dependency mongoose to v5.13.15 [security] #319

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 1, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
mongoose (source) 5.12.7 -> 5.13.15 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2022-2564

Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment.\n\nAffected versions of this package are vulnerable to Prototype Pollution. The Schema.path() function is vulnerable to prototype pollution when setting the schema object. This vulnerability allows modification of the Object prototype and could be manipulated into a Denial of Service (DoS) attack.


automattic/mongoose vulnerable to Prototype pollution via Schema.path

CVE-2022-2564 / GHSA-f825-f98c-gj3g

More information

Details

Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment.\n\nAffected versions of this package are vulnerable to Prototype Pollution. The Schema.path() function is vulnerable to prototype pollution when setting the schema object. This vulnerability allows modification of the Object prototype and could be manipulated into a Denial of Service (DoS) attack.

Severity

  • CVSS Score: 7.0 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


Release Notes

Automattic/mongoose

v5.13.15

Compare Source

====================

v5.13.14

Compare Source

====================

  • fix(timestamps): avoid setting createdAt on documents that already exist but dont have createdAt #​11024
  • docs(models): fix up nModified example for 5.x #​11055

v5.13.13

Compare Source

====================

v5.13.12

Compare Source

====================

  • fix(cursor): use stream destroy method on close to prevent emitting duplicate 'close' #​10897 iovanom
  • fix(index.d.ts): backport streamlining of FilterQuery and DocumentDefinition to avoid "excessively deep and possibly infinite" TS errors #​10617

v5.13.11

Compare Source

====================

  • fix: upgrade mongodb -> 3.7.2 #​10871 winstonralph
  • fix(connection): call setMaxListeners(0) on MongoClient to avoid event emitter memory leak warnings with useDb() #​10732

v5.13.10

Compare Source

====================

  • fix(index.d.ts): allow using type: SchemaDefinitionProperty in schema definitions #​10674
  • fix(index.d.ts): allow AnyObject as param to findOneAndReplace() #​10714

v5.13.9

Compare Source

===================

  • fix(populate): avoid setting empty array on lean document when populate result is undefined #​10599
  • fix(document): make depopulate() handle populated paths underneath document arrays #​10592
  • fix: peg @​types/bson version to 1.x || 4.0.x to avoid stubbed 4.2.x release #​10678
  • fix(index.d.ts): simplify UpdateQuery to avoid "excessively deep and possibly infinite" errors with extends Document and any #​10647
  • fix(index.d.ts): allow specifying weights as an IndexOption #​10586
  • fix: upgrade to mpath v0.8.4 re: security issue #​10683

v5.13.8

Compare Source

===================

  • fix(populate): handle populating subdoc array virtual with sort #​10552
  • fix(model): check for code instead of codeName when checking for existing collections for backwards compat with MongoDB 3.2 #​10420
  • fix(index.d.ts): correct value of this for custom query helper methods #​10545
  • fix(index.d.ts): allow strings for ObjectIds in nested properties #​10573
  • fix(index.d.ts): add match to VirtualTypeOptions.options #​8749
  • fix(index.d.ts): allow QueryOptions populate parameter type PopulateOptions #​10587 osmanakol
  • docs(api): add Document#$where to API docs #​10583

v5.13.7

Compare Source

===================

  • perf(index.d.ts): loosen up restrictions on ModelType generic for Schema for a ~50% perf improvement when compiling TypeScript and using intellisense #​10536 #​10515 #​10349
  • fix(index.d.ts): fix broken Schema#index() types #​10562 JaredReisinger
  • fix(index.d.ts): allow using SchemaTypeOptions with array of raw document interfaces #​10537
  • fix(index.d.ts): define IndexOptions in terms of mongodb.IndexOptions #​10563 JaredReisinger
  • fix(index.d.ts): improve intellisense for DocumentArray push() #​10546
  • fix(index.d.ts): correct type for expires #​10529
  • fix(index.d.ts): add Query#model property to ts bindings #​10531
  • refactor(index.d.ts): make callbacks use the new Callback and CallbackWithoutResult types #​10550 thiagokisaki

v5.13.6

Compare Source

===================

  • fix: upgrade mongodb driver -> 3.6.11 #​10543 maon-fp
  • fix(schema): throw more helpful error when defining a document array using a schema from a different copy of the Mongoose module #​10453
  • fix: add explicit check on constructor property to avoid throwing an error when checking objects with null prototypes #​10512
  • fix(cursor): make sure to clear stack every 1000 docs when calling next() to avoid stack overflow with large batch size #​10449
  • fix(index.d.ts): allow calling new Model(...) with generic Model param #​10526
  • fix(index.d.ts): update type declarations of Schema.index method #​10538 #​10530 Raader
  • fix(index.d.ts): add useNewUrlParser and useUnifiedTopology to ConnectOptions #​10500
  • fix(index.d.ts): add missing type for diffIndexes #​10547 bvgusak
  • fix(index.d.ts): fixed incorrect type definition for Query's .map function #​10544 GCastilho
  • docs(schema): add more info and examples to Schema#indexes() docs #​10446
  • chore: add types property to package.json #​10557 thiagokisaki

v5.13.5

Compare Source

===================

v5.13.4

Compare Source

===================

  • fix: avoid pulling non-schema paths from documents into nested paths #​10449
  • fix(update): support overwriting nested map paths #​10485
  • fix(update): apply timestamps to subdocs that would be newly created by $setOnInsert #​10460
  • fix(map): correctly clone subdocs when calling toObject() on a map #​10486
  • fix(cursor): cap parallel batchSize for populate at 5000 #​10449
  • fix(index.d.ts): improve autocomplete for new Model() by making doc an object with correct keys #​10475
  • fix(index.d.ts): add MongooseOptions interface #​10471 thiagokisaki
  • fix(index.d.ts): make LeanDocument work with PopulatedDoc #​10494
  • docs(mongoose+connection): correct default value for bufferTimeoutMS #​10476
  • chore: remove unnecessary 'eslint-disable' comments #​10466 thiagokisaki

v5.13.3

Compare Source

===================

  • fix(model): avoid throwing error when bulkSave() called on a document with no changes #​10437
  • fix(timestamps): apply timestamps when creating new subdocs with $addToSet and with positional operator #​10447
  • fix(schema): allow calling Schema#loadClass() with class that has a static getter with no setter #​10436
  • fix(model): handle re-applying object defaults after explicitly unsetting #​10442 semirturgay
  • fix: bump mongodb driver -> 3.6.10 #​10440 AbdelrahmanHafez
  • fix(index.d.ts): consistently use NativeDate instead of Date for Date validators and timestamps functions #​10426
  • fix(index.d.ts): allow calling discriminator() with non-document #​10452 #​10421 DouglasGabr
  • fix(index.d.ts): allow passing ResultType generic to Schema#path() #​10435

v5.13.2

Compare Source

===================

v5.13.1

Compare Source

====================

v5.13.0

Compare Source

===================

  • feat(query): add sanitizeProjection option to opt in to automatically sanitizing untrusted query projections #​10243
  • feat(model): add bulkSave() function that saves multiple docs in 1 bulkWrite() #​9727 #​9673 AbdelrahmanHafez
  • feat(document): allow passing a list of virtuals or pathsToSkip to apply in toObject() and toJSON() #​10120
  • fix(model): make Model.validate use object under validation as context by default #​10360 AbdelrahmanHafez
  • feat(document): add support for pathsToSkip in validate and validateSync #​10375 AbdelrahmanHafez
  • feat(model): add diffIndexes() function that calculates what indexes syncIndexes() will create/drop without actually executing any changes #​10362 IslandRhythms
  • feat(document): avoid using sessions that have ended, so you can use documents that were loaded in the session after calling endSession() #​10306

v5.12.15

Compare Source

====================

v5.12.14

Compare Source

====================

  • fix(schema): check that schema type is an object when setting isUnderneathDocArray #​10361 vmo-khanus
  • fix(document): avoid infinite recursion when setting single nested subdoc to array #​10351
  • fix(populate): allow populating nested path in schema using Model.populate() #​10335
  • fix(drivers): emit operation-start/operation-end events to allow inspecting when operations start and end
  • fix(index.d.ts): improve typings for virtuals #​10350 thiagokisaki
  • fix(index.d.ts): correct constructor type for Document #​10328
  • fix(index.d.ts): add ValidationError as a possible type for ValidationError#errors #​10320 IslandRhythms
  • fix: remove unnecessary async devDependency that's causing npm audit warnings #​10281
  • docs(typescript): add schemas guide #​10308
  • docs(model): add options parameter description to Model.exists() #​10336 Aminoiz

v5.12.13

Compare Source

====================

  • perf(document): avoid creating nested paths when running $getAllSubdocs() #​10275
  • fix: make returnDocument option work with findOneAndUpdate() #​10232 #​10231 cnwangjie
  • fix(document): correctly reset subdocument when resetting a map subdocument underneath a single nested subdoc after save #​10295
  • perf(query): avoid setting non-null sessions to avoid overhead from $getAllSubdocs() #​10275
  • perf(document): pre split schematype paths when compiling schema to avoid extra overhead of splitting when hydrating documents #​10275
  • perf(schema): pre-calculate mapPaths to avoid looping over every path for each path when initing doc #​10275
  • fix(index.d.ts): drill down into nested arrays when creating LeanDocument type #​10293

v5.12.12

Compare Source

====================

v5.12.11

Compare Source

====================

  • fix(populate): skip applying setters when casting arrays for populate() to avoid issues with arrays of immutable elements #​10264
  • perf(schematype): avoid cloning setters every time we run setters #​9588
  • perf(get): add benchmarks and extra cases to speed up get() #​9588
  • perf(array): improve array constructor performance on small arrays to improve nested array perf #​9588
  • fix(index.d.ts): allow using type: [String] with string[] when using SchemaDefinition with generic #​10261
  • fix(index.d.ts): support ReadonlyArray as well as regular array where possible in schema definitions #​10260
  • docs(connection): document noListener option to useDb #​10278 stuartpb
  • docs: migrate raw tutorial content from pug / JS to markdown #​10271
  • docs: fix typo #​10269 sanjib

v5.12.10

Compare Source

====================

  • fix(query): allow setting defaults option on result documents from query options #​7287 IslandRhythms
  • fix(populate): handle populating embedded discriminator with custom tiedValue #​10231
  • fix(document): allow passing space-delimited string of pathsToValidate to validate() and validateSync() #​10258
  • fix(model+schema): support loadClass() on classes that have collection as a static property #​10257 #​10254 IslandRhythms
  • fix(SchemaArrayOptions): correct property name #​10236
  • fix(index.d.ts): add any to all query operators to minimize likelihood of "type instantiation is excessively deep" when querying docs with 4-level deep subdocs #​10189
  • fix(index.d.ts): add $parent() in addition to parent() in TS definitions
  • fix(index.d.ts): correct async iterator return type for QueryCursor #​10253 #​10252 #​10251 borfig
  • fix(index.d.ts): add virtualsOnly parameter to loadClass() function signature IslandRhythms
  • docs(typescript): add typescript populate docs #​10212
  • docs: switch from AWS to Azure Functions for search #​10244

v5.12.9

Compare Source

===================

  • fix(schema): ensure add() overwrites existing schema paths by default #​10208 #​10203
  • fix(schema): support creating nested paths underneath document arrays #​10193
  • fix(update): convert nested dotted paths in update to nested paths to avoid ending up with dotted properties in update #​10200
  • fix(document): allow calling validate() and validateSync() with options as first parameter #​10216
  • fix(schema): apply static properties to model when using loadClass() #​10206
  • fix(index.d.ts): allow returning Promise from middleware functions #​10229
  • fix(index.d.ts): add pre('distinct') hooks to TypeScript #​10192

v5.12.8

Compare Source

===================

  • fix(populate): handle populating immutable array paths #​10159
  • fix(CastError): add toJSON() function to ensure name property always ends up in JSON.stringify() output #​10166 IslandRhythms
  • fix(query): add allowDiskUse() method to improve setting MongoDB 4.4's new allowDiskUse option #​10177
  • fix(populate): allow populating paths under mixed schematypes where some documents have non-object properties #​10191
  • chore: remove unnecessary driver dynamic imports so Mongoose can work with Parcel #​9603
  • fix(index.d.ts): allow any object as parameter to create() and insertMany() #​10144
  • fix(index.d.ts): allow creating Model class with raw interface, no extends Document #​10144
  • fix(index.d.ts): separate UpdateQuery from UpdateWithAggregationPipeline for cases when UpdateQuery is used as a function param #​10186
  • fix(index.d.ts): don't require error value in pre/post hooks #​10213 michaln-q
  • docs(typescript): add a typescript intro tutorial and statics tutorial #​10021
  • docs(typescript): add query helpers tutorial #​10021
  • docs(deprecations): add note that you can safely ignore useFindAndModify and useCreateIndex deprecation warnings #​10155
  • chore(workflows): add node 16 to github actions #​10201 AbdelrahmanHafez

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

Signed-off-by: Renovate Bot <bot@renovateapp.com>
@vercel
Copy link

vercel bot commented Feb 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
inreach-api-v1 ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 1, 2023 at 8:05AM (UTC)

@renovate renovate bot added dependencies Pull requests that update a dependency file automerge labels Feb 1, 2023
@ghost
Copy link

ghost commented Feb 1, 2023

👇 Click on the image for a new way to code review
  • Make big changes easier — review code in small groups of related files

  • Know where to start — see the whole change at a glance

  • Take a code tour — explore the change with an interactive tour

  • Make comments and review — all fully sync’ed with github

    Try it now!

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map Legend

@renovate
Copy link
Contributor Author

renovate bot commented Jun 9, 2023

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update (^5.9.10). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the ignoreDeps array of your Renovate config.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate renovate bot deleted the renovate/npm-mongoose-vulnerability branch June 9, 2023 17:17
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
automerge dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant