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

fix(dependency maintenance): update dependency mongoose to v6.13.6 [security] #790

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

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Aug 6, 2022

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
mongoose (source) 6.2.11 -> 6.13.6 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.

CVE-2024-53900

Mongoose versions prior to 8.8.3, 7.8.3, and 6.13.5 are vulnerable to improper use of the $where operator. This vulnerability arises from the ability of the $where clause to execute arbitrary JavaScript code in MongoDB queries, potentially leading to code injection attacks and unauthorized access or manipulation of database data.

CVE-2025-23061

Mongoose versions prior to 8.9.5, 7.8.4, and 6.13.6 are vulnerable to improper use of the $where operator. This vulnerability arises from the ability of the $where clause to execute arbitrary JavaScript code in MongoDB queries, potentially leading to code injection attacks and unauthorized access or manipulation of database data.

NOTE: this issue exists because of an incomplete fix for CVE-2024-53900.


Release Notes

Automattic/mongoose (mongoose)

v6.13.6

Compare Source

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

v6.13.5

Compare Source

v6.13.4

Compare Source

v6.13.3

Compare Source

v6.13.2

Compare Source

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

  • fix(document): make set() respect merge option on deeply nested objects #​14870 #​14878

v6.13.1

Compare Source

v6.13.0

Compare Source

v6.12.9

Compare Source

v6.12.8

Compare Source

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

  • fix(document): handle virtuals that are stored as objects but getter returns string with toJSON #​14468 #​14446
  • fix(schematype): consistently set wasPopulated to object with value property rather than boolean #​14418
  • docs(model): add extra note about lean option for insertMany() skipping casting #​14415 #​14376

v6.12.7

Compare Source

v6.12.6

Compare Source

v6.12.5

Compare Source

v6.12.4

Compare Source

v6.12.3

Compare Source

v6.12.2

Compare Source

v6.12.1

Compare Source

v6.12.0

Compare Source

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

  • feat: use mongodb driver v4.17.1
  • fix(model): make Model.bulkWrite() with empty array and ordered false not throw an error #​13664
  • fix(document): correctly handle inclusive/exclusive projections when applying subdocument defaults #​13763 #​13720

v6.11.6

Compare Source

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

v6.11.5

Compare Source

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

  • fix(schema): make Schema.prototype.clone() avoid creating different copies of subdocuments and single nested paths underneath single nested paths #​13671 #​13626
  • fix: custom debug function not processing all args #​13418

v6.11.4

Compare Source

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

  • perf: speed up mapOfSubdocs benchmark by 4x by avoiding unnecessary O(n^2) loop in getPathsToValidate() #​13614

7.3.4 / 2023-07-12

  • chore: release 7.4.4 to overwrite accidental publish of 5.13.20 to latest tag

v6.11.3

Compare Source

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

  • fix: avoid prototype pollution on init
  • fix(schema): correctly handle uuids with populate() #​13317 #​13595

v6.11.2

Compare Source

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

v6.11.1

Compare Source

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

  • fix(query): apply schema-level paths before calculating projection for findOneAndUpdate() #​13348 #​13340
  • fix: add SUPPRESS_JEST_WARNINGS environment variable to hide jest warnings #​13384 #​13373
  • types(model): allow overwriting expected param type for bulkWrite() #​13292 hasezoey

v6.11.0

Compare Source

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

v6.10.5

Compare Source

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

  • perf(document): avoid unnecessary loops, conditionals, string manipulation on Document.prototype.get() for 10x speedup on top-level properties #​12953
  • fix(model): execute valid write operations if calling bulkWrite() with ordered: false #​13218 #​13176
  • fix(array): pass-through all parameters #​13202 #​13201 hasezoey
  • fix: improve error message when sorting by empty string #​13249 #​10182
  • docs: add version support and check version docs #​13251 #​13193

v6.10.4

Compare Source

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

  • fix(document): apply setters on resulting value when calling Document.prototype.$inc() #​13178 #​13158
  • fix(model): add results property to unordered insertMany() to make it easy to identify exactly which documents were inserted #​13163 #​12791
  • docs(guide+schematypes): add UUID to schematypes guide #​13184

v6.10.3

Compare Source

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

v6.10.2

Compare Source

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

  • fix(document): avoid setting array default if document array projected out by sibling projection #​13135 #​13043 #​13003
  • fix(documentarray): set correct document array path if making map of document arrays #​13133
  • fix: undo accidental change to engines in package.json #​13124 lorand-horvath
  • docs: quick improvement to Model.init() docs #​13054

v6.10.1

Compare Source

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

v6.10.0

Compare Source

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

v6.9.3

Compare Source

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

v6.9.2

Compare Source

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

v6.9.1

Compare Source

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

  • fix(document): isModified should not be triggered when setting a nested boolean to the same value as previously #​12994 lpizzinidev
  • fix(document): save newly set defaults underneath single nested subdocuments #​13002 #​12905
  • fix(update): handle custom discriminator model name when casting update #​12947 wassil
  • fix(connection): handles unique autoincrement ID for connections #​12990 lpizzinidev
  • fix(types): fix type of options of Model.aggregate #​12933 ghost91-
  • fix(types): fix "near" aggregation operator input type #​12954 Jokero
  • fix(types): add missing Top operator to AccumulatorOperator type declaration #​12952 lpizzinidev
  • docs(transactions): added example for Connection.transaction() method #​12943 #​12934 lpizzinidev
  • docs(populate): fix out of date comment referencing onModel property #​13000
  • docs(transactions): fix typo in transactions.md #​12995 Parth86

v6.9.0

Compare Source

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

v6.8.4

Compare Source

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

v6.8.3

Compare Source

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

  • perf: improve performance of assignRawDocsToIdStructure for faster populate on large docs #​12867 Uzlopak
  • fix(model): ensure consistent ordering of validation errors in insertMany() with ordered: false and rawResult: true #​12866
  • fix: avoid passing final callback to pre hook, because calling the callback can mess up hook execution #​12836
  • fix(types): avoid inferring timestamps if methods, virtuals, or statics set #​12871
  • fix(types): correctly infer string enums on const arrays #​12870 JavaScriptBach
  • fix(types): allow virtuals to be invoked in the definition of other virtuals #​12874 sffc
  • fix(types): add type def for Aggregate#model without arguments #​12864 hasezoey
  • docs(discriminators): add section about changing discriminator key #​12861
  • docs(typescript): explain that virtuals inferred from schema only show up on Model, not raw document type #​12860 #​12684

v6.8.2

Compare Source

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

  • fix(schema): propagate strictQuery to implicitly created schemas for embedded discriminators #​12827 #​12796
  • fix(model): respect discriminators with Model.validate() #​12824 #​12621
  • fix(query): fix unexpected validation error when doing findOneAndReplace() with a nullish value #​12826 #​12821
  • fix(discriminator): apply built-in plugins to discriminator schema even if mergeHooks and mergePlugins are both false #​12833 #​12696
  • fix(types): add option "overwriteModels" as a schema option #​12817 #​12816 hasezoey
  • fix(types): add property "defaultOptions" #​12818 hasezoey
  • docs: make search bar respect documentation version, so you can search 5.x docs #​12548
  • docs(typescript): make note about recommending strict mode when using auto typed schemas #​12825 #​12420
  • docs: add section on sorting to query docs #​12588 IslandRhythms
  • test(query.test): add write-concern option #​12829 hasezoey

v6.8.1

Compare Source

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

v6.8.0

Compare Source

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

v6.7.5

Compare Source

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

v6.7.4

Compare Source

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

v6.7.3

Compare Source

v6.7.2

Compare Source

v6.7.1

Compare Source

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

v6.7.0

Compare Source

v6.6.7

Compare Source

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

v6.6.6

Compare Source

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

v6.6.5

Compare Source

v6.6.4

Compare Source

v6.6.3

Compare Source

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

v6.6.2

Compare Source

v6.6.1

Compare Source

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

  • fix: correctly apply defaults after subdoc init #​12328
  • fix(array): avoid using default _id when using pull() #​12294
  • fix: allow null values inside $expr objects #​12429 MartinDrost
  • fix(query): use correct Query constructor when cloning query #​12418
  • docs(website): remove setting "latest38x" which is not used anywhere #​12396 hasezoey

v6.6.0

Compare Source

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

v6.5.5

Compare Source

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

  • fix(setDefaultsOnInsert): avoid applying defaults on insert if nested property set #​12279
  • fix(model): make applyHooks() and applyMethods() handle case where custom method is set to Mongoose implementation #​12254
  • fix(types): add string "ascending" and "descending" index-directions #​10269
  • docs: upgrade dox to 1.0.0 #​12403 hasezoey
  • docs: update old mongodb nodejs driver documentation urls #​12387 hasezoey
  • docs: update JSDOC ... (spread) definition #​12388 hasezoey
  • refactor(model): allow optionally passing indexes to createIndexes and cleanIndexes #​12280 AbdelrahmanHafez

v6.5.4

Compare Source

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

  • fix(document): allow calling $assertPopulated() with values to better support manual population #​12233
  • fix(connection+mongoose): better handling for calling model() with 1 argument #​12359
  • fix(model): allow defining discriminator virtuals and methods using schema options #​12326
  • fix(types): fix MongooseQueryMiddleware missing "findOneAndReplace" and "replaceOne" #​12330 #​12329 Jule- lpizzinidev
  • fix(types): fix replaceOne return type #​12351 lpizzinidev
  • fix(types): use this for return type from $assertPopulated() #​12234
  • docs: highlight how to connect using auth in README #​12354 AntonyOnScript
  • docs: improve jsdoc comments for private methods #​12337 hasezoey
  • docs: fix minor typo in compatibility table header #​12355 skyme5

v6.5.3

Compare Source

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

  • fix(document): handle maps when applying defaults to nested paths #​12322
  • fix(schema): make ArraySubdocuments apply _id defaults on init #​12264
  • fix(populate): handle specifying recursive populate as a string with discriminators #​12266
  • perf(types): remove extends Query in Schema.pre() and Schema.post(), loosen discriminator() generic #​10349
  • perf(types): some more micro-optimizations re: #​10349, remove extra type checking on $ne, etc.
  • fix(types): infer schema on connection.model() [#&#

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 this update 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
Copy link
Contributor Author

renovate bot commented Aug 6, 2022

⚠ 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 ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @typegoose/typegoose@9.7.1
npm ERR! Found: mongoose@6.11.3
npm ERR! node_modules/mongoose
npm ERR!   mongoose@"6.11.3" from the root project
npm ERR!   peer mongoose@"^6.0.2" from @nestjs/mongoose@9.0.3
npm ERR!   node_modules/@nestjs/mongoose
npm ERR!     @nestjs/mongoose@"9.0.3" from the root project
npm ERR!   1 more (mongoose-cast-aggregation)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer mongoose@"~6.2.3" from @typegoose/typegoose@9.7.1
npm ERR! node_modules/@typegoose/typegoose
npm ERR!   @typegoose/typegoose@"9.7.1" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: mongoose@6.2.11
npm ERR! node_modules/mongoose
npm ERR!   peer mongoose@"~6.2.3" from @typegoose/typegoose@9.7.1
npm ERR!   node_modules/@typegoose/typegoose
npm ERR!     @typegoose/typegoose@"9.7.1" 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! See /tmp/renovate/cache/others/npm/eresolve-report.txt for a full report.

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

@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch 2 times, most recently from 78abb55 to 226efcb Compare August 17, 2022 08:32
@renovate renovate bot changed the title chore(dependency maintenance): update dependency mongoose to 6.4.6 [security] chore(dependency maintenance): update dependency mongoose to 6.4.6 [security] - autoclosed Aug 25, 2022
@renovate renovate bot closed this Aug 25, 2022
@renovate renovate bot deleted the renovate/npm-mongoose-vulnerability branch August 25, 2022 22:37
@renovate renovate bot changed the title chore(dependency maintenance): update dependency mongoose to 6.4.6 [security] - autoclosed chore(dependency maintenance): update dependency mongoose to 6.4.6 [security] Aug 26, 2022
@renovate renovate bot reopened this Aug 26, 2022
@renovate renovate bot restored the renovate/npm-mongoose-vulnerability branch August 26, 2022 10:38
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch from 226efcb to 40f7fa0 Compare August 26, 2022 14:54
@renovate renovate bot changed the title chore(dependency maintenance): update dependency mongoose to 6.4.6 [security] chore(dependency maintenance): update dependency mongoose to 5.13.15 [security] Aug 26, 2022
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch 2 times, most recently from 3b1a76d to 0b5bf73 Compare September 8, 2022 08:49
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch 2 times, most recently from 4e86fc9 to 045b7d1 Compare November 3, 2022 16:25
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch from 045b7d1 to 99112e8 Compare November 14, 2022 15:15
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch from 99112e8 to 7a5f948 Compare March 16, 2023 23:56
@renovate renovate bot changed the title chore(dependency maintenance): update dependency mongoose to 5.13.15 [security] chore(dependency maintenance): update dependency mongoose to 6.4.6 [security] Mar 16, 2023
@renovate renovate bot changed the title chore(dependency maintenance): update dependency mongoose to 6.4.6 [security] fix(dependency maintenance): update dependency mongoose to v6.4.6 [security] Mar 23, 2023
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch from 7a5f948 to 88c84f6 Compare July 18, 2023 20:15
@renovate renovate bot changed the title fix(dependency maintenance): update dependency mongoose to v6.4.6 [security] fix(dependency maintenance): update dependency mongoose to v6.11.3 [security] Jul 18, 2023
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch 3 times, most recently from 82c36b9 to cb6e8c7 Compare February 26, 2024 10:54
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch 2 times, most recently from 87de10d to 7bf7827 Compare March 28, 2024 06:27
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch 4 times, most recently from e0fc987 to 4312985 Compare April 5, 2024 07:59
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch 7 times, most recently from 76bb7d6 to 0d190ed Compare August 6, 2024 13:22
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch 4 times, most recently from d96af76 to 11951b0 Compare August 23, 2024 10:03
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch 2 times, most recently from d7093af to 7f58235 Compare September 16, 2024 10:07
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch 2 times, most recently from 4ba8389 to 04b9641 Compare September 25, 2024 15:39
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch 2 times, most recently from c2fdabc to 97c83d3 Compare October 24, 2024 10:11
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch from 97c83d3 to fb9f7d1 Compare December 3, 2024 06:39
@renovate renovate bot changed the title fix(dependency maintenance): update dependency mongoose to v6.11.3 [security] fix(dependency maintenance): update dependency mongoose to v8 [security] Dec 3, 2024
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch from fb9f7d1 to a6aa0b6 Compare December 4, 2024 20:31
@renovate renovate bot changed the title fix(dependency maintenance): update dependency mongoose to v8 [security] fix(dependency maintenance): update dependency mongoose to v6.11.3 [security] Dec 4, 2024
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch from a6aa0b6 to d808149 Compare December 5, 2024 00:50
@renovate renovate bot changed the title fix(dependency maintenance): update dependency mongoose to v6.11.3 [security] fix(dependency maintenance): update dependency mongoose to v6.13.5 [security] Dec 5, 2024
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch from d808149 to c17b79e Compare January 17, 2025 00:40
@renovate renovate bot changed the title fix(dependency maintenance): update dependency mongoose to v6.13.5 [security] fix(dependency maintenance): update dependency mongoose to v8 [security] Jan 17, 2025
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch from c17b79e to a216f3e Compare January 17, 2025 20:44
@renovate renovate bot changed the title fix(dependency maintenance): update dependency mongoose to v8 [security] fix(dependency maintenance): update dependency mongoose to v6.13.5 [security] Jan 17, 2025
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch from a216f3e to a4ebe01 Compare January 18, 2025 01:07
@renovate renovate bot changed the title fix(dependency maintenance): update dependency mongoose to v6.13.5 [security] fix(dependency maintenance): update dependency mongoose to v6.13.6 [security] Jan 18, 2025
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