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 v6.11.3 [security] #4728

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

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jul 18, 2023

Mend Renovate

This PR contains the following updates:

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

GitHub Vulnerability Alerts

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)

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

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

v6.5.2

Compare Source

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

  • fix(aggregate): avoid throwing error when disconnecting with change stream open #​12201 ramos-ph
  • fix(query): overwrite top-level key if using Query.prototype.set() to set to undefined #​12155
  • fix(query): shallow clone options before modifying #​12176
  • fix(types): auto schema type inference on Connection.prototype.model() #​12240 hasezoey
  • fix(types): better typescript support for schema plugins #​12139 emiljanitzek
  • fix(types): make bulkWrite() type param optional #​12221 #​12212
  • docs: misc cleanup #​12199 hasezoey
  • docs: highlight current top-most visible header in navbar #​12222 hasezoey
  • docs(populate): improve examples for Document.prototype.populate() #​12111
  • docs(middleware): clarify document vs model in middleware docs #​12113

v6.5.1

Compare Source

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

  • fix(timestamps): set timestamps on child schema when child schema has timestamps: true but parent schema does not #​12119
  • fix(schema+timestamps): handle insertMany() with timestamps and discriminators #​12150
  • fix(model+query): handle populate with lean transform that deletes _id #​12143
  • fix(types): allow $pull with _id #​12142
  • fix(types): add schema plugin option inference #​12196 hasezoey
  • fix(types): pass type to mongodb bulk write operation #​12167 emiljanitzek
  • fix(types): map correct generics from model to schema #​12125 emiljanitzek
  • fix(types): avoid baffling circular reference when using PopulatedDoc with a bidirectional reference #​12136
  • fix(types): allow using path with $count #​12149
  • docs(compatibility): change to use a table #​12200 hasezoey
  • docs(api_split.pug): add "code" to sidebar entries #​12153 hasezoey
  • docs: add "code" to Headers (and index list) #​12152 hasezoey

v6.5.0

Compare Source

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

  • perf(document): avoid creating unnecessary empty objects when creating a state machine #​11988
  • feat: upgrade mongodb driver -> 4.8.1 #​12103 AbdelrahmanHafez
  • feat(model): allow passing timestamps option to Model.bulkSave(...) #​12082 AbdelrahmanHafez
  • feat(model): add castObject() function that casts a POJO to the model's schema #​11945
  • feat(document): add $inc() helper that increments numeric paths #​12115
  • feat(schema): add schema level lean option IslandRhythms
  • feat(schema): add global id option to disable id on schemas #​12067 IslandRhythms
  • fix(connection): re-run Model.init() if re-connecting after explicitly closing a connection #​12130
  • feat(model): add applyDefaults() helper that allows applying defaults to document or POJO #​11945
  • feat(model): allow calling hydrate() with { setters: true } #​11653
  • feat(model): add hydrate option to Model.watch() to automatically hydrate fullDocument #​12121
  • feat(types): add support for automatically typed virtuals in schemas #​11908 mohammad0-0ahmad

v6.4.7

Compare Source

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

v6.4.6

Compare Source

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

  • fix(schema): disallow setting proto when creating schema with dotted properties #​12085
  • fix(document): avoid mutating original object passed to $set() when applying defaults to nested properties #​12102
  • fix(query): apply lean transform option to top-level document #​12093
  • docs(migrating_to_6): correct example for isObjectIdOrHexString() #​12123 LokeshKanumoori

v6.4.5

Compare Source

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

  • fix(model+timestamps): set timestamps on subdocuments in insertMany() #​12060
  • fix: correct isAtlas check #​12110 skrtheboss
  • fix(types): fix various issues with auto typed schemas #​12042 [mohammad0-

Configuration

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

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, 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.

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Jul 18, 2023
@renovate renovate bot enabled auto-merge (rebase) July 18, 2023 18:22
@nx-cloud
Copy link

nx-cloud bot commented Jul 18, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 1b09b10. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


🟥 Failed Commands
nx affected --target build --prod --parallel=false
nx docker api
✅ Successfully ran 5 targets

Sent with 💌 from NxCloud.

@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch 7 times, most recently from 72a2641 to cc15b9c Compare July 28, 2023 12:10
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch 8 times, most recently from dc85f84 to 90ac7b2 Compare August 4, 2023 14:55
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch 11 times, most recently from eeb4507 to 9fe0178 Compare August 12, 2023 20:31
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch 6 times, most recently from d45ba32 to ae9377b Compare February 4, 2024 00:31
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch 2 times, most recently from 898981e to 59e1f32 Compare February 18, 2024 00:21
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch from 59e1f32 to 0a59c9f Compare February 18, 2024 04:17
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch 2 times, most recently from 4dea757 to 43fc353 Compare March 3, 2024 03:39
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch from 43fc353 to 95d76e3 Compare March 10, 2024 01:20
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch 2 times, most recently from 359db2f to fd40342 Compare March 24, 2024 01:43
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch from fd40342 to 05495cb Compare March 31, 2024 00:45
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch 5 times, most recently from 5c667a3 to 27b2b7e Compare April 14, 2024 01:15
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch 5 times, most recently from 55345f2 to 32588d5 Compare April 28, 2024 00:59
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch from 32588d5 to 3b34ee1 Compare May 5, 2024 04:35
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch from 3b34ee1 to bb8f7db Compare May 12, 2024 04:52
@renovate renovate bot force-pushed the renovate/npm-mongoose-vulnerability branch from bb8f7db to 8c8273a Compare May 19, 2024 03:51
Copy link

sonarcloud bot commented May 19, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants