Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency mongoose to v5.13.20 [security] #654

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented May 28, 2023

This PR contains the following updates:

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

GitHub Vulnerability Alerts

CVE-2022-2564

Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. Affected 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.

CVE-2023-3696

Prototype Pollution in GitHub repository automattic/mongoose prior to 7.3.3, 6.11.3, and 5.13.20.

CVE-2022-24304

Description

Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment.

Affected 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.

Proof of Concept

// poc.js
const mongoose = require('mongoose');
const schema = new mongoose.Schema();

malicious_payload = '__proto__.toString'

schema.path(malicious_payload, [String])

x = {}
console.log(x.toString()) // crashed (Denial of service (DoS) attack)

Impact

This vulnerability can be manipulated to exploit other types of attacks, such as Denial of service (DoS), Remote Code Execution, or Property Injection.


Release Notes

Automattic/mongoose (mongoose)

v5.13.20

Compare Source

v5.13.19

Compare Source

v5.13.18

Compare Source

v5.13.17

Compare Source

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

v5.13.16

Compare Source

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

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

Configuration

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

🚦 Automerge: Enabled.

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 these updates again.


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

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch from 581f43e to 04dcc3a Compare June 4, 2023 10:21
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch 3 times, most recently from 1d6c923 to db0b44e Compare June 19, 2023 06:59
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch from db0b44e to 9cbfe3f Compare June 29, 2023 09:12
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch 2 times, most recently from e4abe3d to a5ae4b5 Compare July 9, 2023 11:06
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch from a5ae4b5 to 3bd6186 Compare July 16, 2023 17:44
@renovate
Copy link
Author

renovate bot commented Jul 19, 2023

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: doxdox-parser-dox@2.0.0
npm WARN Found: doxdox@3.0.0
npm WARN node_modules/doxdox
npm WARN   dev doxdox@"3.0.0" from the root project
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer doxdox@"~2.0.3" from doxdox-parser-dox@2.0.0
npm WARN node_modules/doxdox-parser-dox
npm WARN   doxdox-parser-dox@"~2.0.0" from doxdox@3.0.0
npm WARN   node_modules/doxdox
npm WARN 
npm WARN Conflicting peer dependency: doxdox@2.0.3
npm WARN node_modules/doxdox
npm WARN   peer doxdox@"~2.0.3" from doxdox-parser-dox@2.0.0
npm WARN   node_modules/doxdox-parser-dox
npm WARN     doxdox-parser-dox@"~2.0.0" from doxdox@3.0.0
npm WARN     node_modules/doxdox
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: doxdox-plugin-bootstrap@2.0.0
npm WARN Found: doxdox@3.0.0
npm WARN node_modules/doxdox
npm WARN   dev doxdox@"3.0.0" from the root project
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer doxdox@"~2.0.3" from doxdox-plugin-bootstrap@2.0.0
npm WARN node_modules/doxdox-plugin-bootstrap
npm WARN   doxdox-plugin-bootstrap@"~2.0.0" from doxdox@3.0.0
npm WARN   node_modules/doxdox
npm WARN 
npm WARN Conflicting peer dependency: doxdox@2.0.3
npm WARN node_modules/doxdox
npm WARN   peer doxdox@"~2.0.3" from doxdox-plugin-bootstrap@2.0.0
npm WARN   node_modules/doxdox-plugin-bootstrap
npm WARN     doxdox-plugin-bootstrap@"~2.0.0" from doxdox@3.0.0
npm WARN     node_modules/doxdox
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: doxdox-plugin-handlebars@2.0.0
npm WARN Found: doxdox@3.0.0
npm WARN node_modules/doxdox
npm WARN   dev doxdox@"3.0.0" from the root project
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer doxdox@"~2.0.3" from doxdox-plugin-handlebars@2.0.0
npm WARN node_modules/doxdox-plugin-handlebars
npm WARN   doxdox-plugin-handlebars@"~2.0.0" from doxdox@3.0.0
npm WARN   node_modules/doxdox
npm WARN 
npm WARN Conflicting peer dependency: doxdox@2.0.3
npm WARN node_modules/doxdox
npm WARN   peer doxdox@"~2.0.3" from doxdox-plugin-handlebars@2.0.0
npm WARN   node_modules/doxdox-plugin-handlebars
npm WARN     doxdox-plugin-handlebars@"~2.0.0" from doxdox@3.0.0
npm WARN     node_modules/doxdox
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: doxdox-plugin-markdown@2.0.0
npm WARN Found: doxdox@3.0.0
npm WARN node_modules/doxdox
npm WARN   dev doxdox@"3.0.0" from the root project
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer doxdox@"~2.0.3" from doxdox-plugin-markdown@2.0.0
npm WARN node_modules/doxdox-plugin-markdown
npm WARN   doxdox-plugin-markdown@"~2.0.0" from doxdox@3.0.0
npm WARN   node_modules/doxdox
npm WARN 
npm WARN Conflicting peer dependency: doxdox@2.0.3
npm WARN node_modules/doxdox
npm WARN   peer doxdox@"~2.0.3" from doxdox-plugin-markdown@2.0.0
npm WARN   node_modules/doxdox-plugin-markdown
npm WARN     doxdox-plugin-markdown@"~2.0.0" from doxdox@3.0.0
npm WARN     node_modules/doxdox
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: eslint-config-prettier@7.2.0
npm ERR! Found: eslint@6.8.0
npm ERR! node_modules/eslint
npm ERR!   peer eslint@"^5.16.0 || ^6.8.0 || ^7.2.0" from eslint-config-airbnb-base@14.2.1
npm ERR!   node_modules/eslint-config-airbnb-base
npm ERR!     dev eslint-config-airbnb-base@"14.2.1" from the root project
npm ERR!   peer eslint@"^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0" from eslint-plugin-import@2.23.4
npm ERR!   node_modules/eslint-plugin-import
npm ERR!     peer eslint-plugin-import@"^2.22.1" from eslint-config-airbnb-base@14.2.1
npm ERR!     node_modules/eslint-config-airbnb-base
npm ERR!       dev eslint-config-airbnb-base@"14.2.1" from the root project
npm ERR!     dev eslint-plugin-import@"2.23.4" from the root project
npm ERR!   4 more (eslint-plugin-jsdoc, eslint-plugin-mocha, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@">=7.0.0" from eslint-config-prettier@7.2.0
npm ERR! node_modules/eslint-config-prettier
npm ERR!   dev eslint-config-prettier@"7.2.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: eslint@9.1.1
npm ERR! node_modules/eslint
npm ERR!   peer eslint@">=7.0.0" from eslint-config-prettier@7.2.0
npm ERR!   node_modules/eslint-config-prettier
npm ERR!     dev eslint-config-prettier@"7.2.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /tmp/renovate/cache/others/npm/_logs/2024-04-25T09_08_27_571Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /tmp/renovate/cache/others/npm/_logs/2024-04-25T09_08_27_571Z-debug-0.log

Copy link
Author

renovate bot commented Jun 4, 2024

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: doxdox-parser-dox@2.0.0
npm warn Found: doxdox@3.0.0
npm warn node_modules/doxdox
npm warn   dev doxdox@"3.0.0" from the root project
npm warn
npm warn Could not resolve dependency:
npm warn peer doxdox@"~2.0.3" from doxdox-parser-dox@2.0.0
npm warn node_modules/doxdox-parser-dox
npm warn   doxdox-parser-dox@"~2.0.0" from doxdox@3.0.0
npm warn   node_modules/doxdox
npm warn
npm warn Conflicting peer dependency: doxdox@2.0.3
npm warn node_modules/doxdox
npm warn   peer doxdox@"~2.0.3" from doxdox-parser-dox@2.0.0
npm warn   node_modules/doxdox-parser-dox
npm warn     doxdox-parser-dox@"~2.0.0" from doxdox@3.0.0
npm warn     node_modules/doxdox
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: doxdox-plugin-bootstrap@2.0.0
npm warn Found: doxdox@3.0.0
npm warn node_modules/doxdox
npm warn   dev doxdox@"3.0.0" from the root project
npm warn
npm warn Could not resolve dependency:
npm warn peer doxdox@"~2.0.3" from doxdox-plugin-bootstrap@2.0.0
npm warn node_modules/doxdox-plugin-bootstrap
npm warn   doxdox-plugin-bootstrap@"~2.0.0" from doxdox@3.0.0
npm warn   node_modules/doxdox
npm warn
npm warn Conflicting peer dependency: doxdox@2.0.3
npm warn node_modules/doxdox
npm warn   peer doxdox@"~2.0.3" from doxdox-plugin-bootstrap@2.0.0
npm warn   node_modules/doxdox-plugin-bootstrap
npm warn     doxdox-plugin-bootstrap@"~2.0.0" from doxdox@3.0.0
npm warn     node_modules/doxdox
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: doxdox-plugin-handlebars@2.0.0
npm warn Found: doxdox@3.0.0
npm warn node_modules/doxdox
npm warn   dev doxdox@"3.0.0" from the root project
npm warn
npm warn Could not resolve dependency:
npm warn peer doxdox@"~2.0.3" from doxdox-plugin-handlebars@2.0.0
npm warn node_modules/doxdox-plugin-handlebars
npm warn   doxdox-plugin-handlebars@"~2.0.0" from doxdox@3.0.0
npm warn   node_modules/doxdox
npm warn
npm warn Conflicting peer dependency: doxdox@2.0.3
npm warn node_modules/doxdox
npm warn   peer doxdox@"~2.0.3" from doxdox-plugin-handlebars@2.0.0
npm warn   node_modules/doxdox-plugin-handlebars
npm warn     doxdox-plugin-handlebars@"~2.0.0" from doxdox@3.0.0
npm warn     node_modules/doxdox
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: doxdox-plugin-markdown@2.0.0
npm warn Found: doxdox@3.0.0
npm warn node_modules/doxdox
npm warn   dev doxdox@"3.0.0" from the root project
npm warn
npm warn Could not resolve dependency:
npm warn peer doxdox@"~2.0.3" from doxdox-plugin-markdown@2.0.0
npm warn node_modules/doxdox-plugin-markdown
npm warn   doxdox-plugin-markdown@"~2.0.0" from doxdox@3.0.0
npm warn   node_modules/doxdox
npm warn
npm warn Conflicting peer dependency: doxdox@2.0.3
npm warn node_modules/doxdox
npm warn   peer doxdox@"~2.0.3" from doxdox-plugin-markdown@2.0.0
npm warn   node_modules/doxdox-plugin-markdown
npm warn     doxdox-plugin-markdown@"~2.0.0" from doxdox@3.0.0
npm warn     node_modules/doxdox
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: eslint-config-prettier@7.2.0
npm error Found: eslint@6.8.0
npm error node_modules/eslint
npm error   peer eslint@"^5.16.0 || ^6.8.0 || ^7.2.0" from eslint-config-airbnb-base@14.2.1
npm error   node_modules/eslint-config-airbnb-base
npm error     dev eslint-config-airbnb-base@"14.2.1" from the root project
npm error   peer eslint@"^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0" from eslint-plugin-import@2.23.4
npm error   node_modules/eslint-plugin-import
npm error     peer eslint-plugin-import@"^2.22.1" from eslint-config-airbnb-base@14.2.1
npm error     node_modules/eslint-config-airbnb-base
npm error       dev eslint-config-airbnb-base@"14.2.1" from the root project
npm error     dev eslint-plugin-import@"2.23.4" from the root project
npm error   4 more (eslint-plugin-jsdoc, eslint-plugin-mocha, ...)
npm error
npm error Could not resolve dependency:
npm error peer eslint@">=7.0.0" from eslint-config-prettier@7.2.0
npm error node_modules/eslint-config-prettier
npm error   dev eslint-config-prettier@"7.2.0" from the root project
npm error
npm error Conflicting peer dependency: eslint@9.12.0
npm error node_modules/eslint
npm error   peer eslint@">=7.0.0" from eslint-config-prettier@7.2.0
npm error   node_modules/eslint-config-prettier
npm error     dev eslint-config-prettier@"7.2.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /tmp/renovate/cache/others/npm/_logs/2024-10-09T10_33_33_978Z-eresolve-report.txt
npm error A complete log of this run can be found in: /tmp/renovate/cache/others/npm/_logs/2024-10-09T10_33_33_978Z-debug-0.log

@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch from 3bd6186 to 286b278 Compare August 6, 2024 08:59
@renovate renovate bot changed the title chore(deps): update dependency mongoose to v5.13.15 [security] chore(deps): update dependency mongoose to v5.13.20 [security] Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants