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

🚨 [security] Update mongoose 5.7.9 → 5.13.22 (minor) #296

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

Conversation

depfu[bot]
Copy link

@depfu depfu bot commented Apr 23, 2024


🚨 Your current dependencies have known security vulnerabilities 🚨

This dependency update fixes known security vulnerabilities. Please see the details below and assess their impact carefully. We recommend to merge and deploy this as soon as possible!


Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ mongoose (5.7.9 → 5.13.22) · Repo · Changelog

Security Advisories 🚨

🚨 Mongoose Prototype Pollution vulnerability

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

🚨 Mongoose Vulnerable to Prototype Pollution in Schema Object

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.

🚨 automattic/mongoose vulnerable to Prototype pollution via Schema.path

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.

Release Notes

Too many releases to show here. View the full release notes.

✳️ chart.js (2.9.1 → 2.9.4) · Repo

Security Advisories 🚨

🚨 Prototype pollution in chart.js

This affects the package chart.js before 2.9.4. The options parameter is not properly sanitized when it is processed. When the options are processed, the existing options (or the defaults options) are deeply merged with provided options. However, during this operation, the keys of the object being set are not checked, leading to a prototype pollution.

Release Notes

2.9.4

This is the last release of v2 and focused on fixing bugs identified in the v2.9.3 release.

Bugs Fixed

  • #7404 - Preserve prototypes when cloning. Thanks @iddings
  • #7587 - Fix docs for external moment.js. Thanks @mojoaxel
  • #7853 - Fix box recursion when dimensions are NaN. Thanks @alessandroasm
  • #7883 - Fix call stack exception when computing label sizes. Thanks @silentmatt
  • #7918 - Prevent global prototype pollution via the merge helper
  • #7920 - Use Object.create(null) as merge target, to prevent prototype pollution

2.9.3

Bug Fixes

  • #6698 Fix undefined variable
  • #6719 Don't make legend empty when fill is false

Thanks to the maintainers and collaborators for their help to improve and test Chart.js (@kurkle, @benmccann, and @etimberg).

2.9.2

Bug Fixes

  • #6641 IE11 & Edge compatible style injection
  • #6655 Backwards compatible default fill for radar charts
  • #6660 Improve clipping of line charts when border widths are large
  • #6661 When a legend item is clicked, make sure the correct item is hidden
  • #6663 Refresh package-lock file to pick up new dependency

Performance

  • #6671 Stop unnecessary line calculations

Documentation

  • #6643 Combine performance documentation sections

Thanks to the maintainers and collaborators for their help to improve and test Chart.js (@nagix, @kurkle, @benmccann, @etimberg and @simonbrunel).

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ kareem (indirect, 2.3.1 → 2.3.2) · Repo · Changelog

Commits

See the full diff on Github. The new version differs by 6 commits:

↗️ mpath (indirect, 0.6.0 → 0.8.4) · Repo · Changelog

Security Advisories 🚨

🚨 Type confusion in mpath

This affects the package mpath before 0.8.4. A type confusion vulnerability can lead to a bypass of CVE-2018-16490. In particular, the condition ignoreProperties.indexOf(parts[i]) !== -1 returns -1 if parts[i] is ['__proto__']. This is because the method that has been called if the input is an array is Array.prototype.indexOf() and not String.prototype.indexOf(). They behave differently depending on the type of the input.

Release Notes

0.8.4 (from changelog)

  • fix: throw error if parts contains an element that isn't a string or number #13

0.8.3 (from changelog)

  • fix: use var instead of let/const for Node.js 4.x support

0.8.2 (from changelog)

  • fix(stringToParts): fall back to legacy treatment for square brackets if square brackets contents aren't a number Automattic/mongoose#9640
  • chore: add eslint

0.8.1 (from changelog)

  • fix(stringToParts): handle empty string and trailing dot the same way that split() does for backwards compat

0.8.0 (from changelog)

  • feat: support square bracket indexing for get(), set(), has(), and unset()

0.7.0 (from changelog)

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 15 commits:

↗️ mquery (indirect, 3.2.2 → 3.2.5) · Repo · Changelog

Security Advisories 🚨

🚨 Code Injection in mquery

lib/utils.js in mquery before 3.2.3 allows a pollution attack because a special property (e.g., proto) can be copied during a merge or clone operation.

Release Notes

3.2.5 (from changelog)

  • fix(utils): make mergeClone() skip special properties like __proto__ #121 zpbrent

3.2.4 (from changelog)

3.2.3 (from changelog)

  • fix(utils): avoid copying special properties like __proto__ when merging and cloning

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 12 commits:

↗️ sift (indirect, 7.0.1 → 13.5.2) · Repo · Changelog

Release Notes

12.0.0 (from changelog)

  • Fix bug where $elemMatch tested objects: e.g: sift({a: {$elemMatch: 1}})({ a: { b: 1}}). $elemMatch now expects arrays based on Mongodb syntax. E.g: sift({a: {$elemMatch: 1}})({ a: { b: 1}})

11.0.0 (from changelog)

  • new custom operations syntax (see API readme)
  • null & undefined are not treated equally (change has been added to keep spec as functionality as possible to MongoDB)
  • select option has been removed
  • compare option now expects boolean return value instead of an integer
  • nested queries are no-longer supported
  • expressions option is now operations
  • operations parameter now expects new operations API

10.0.0 (from changelog)

  • new custom operations syntax (see API readme)
  • null & undefined are not treated equally (change has been added to keep spec as functionality as possible to MongoDB)
  • select option is not supported anymore
  • compare option now expects boolean return value
  • nested queries are no-longer supported

9.0.0 (from changelog)

  • (behavior change) toJSON works for vanilla objects.

8.5.1 (from changelog)

  • Fix dependency vulnerability
  • Fix #158

8.5.0 (from changelog)

  • Added comparable option (fix #156)

8.4.0 (from changelog)

  • Added compare option (fix #155)

8.3.2 (from changelog)

  • Query properties now excpect exact object shape (based on #152). E.g: [{a: { b: 1}}, {a: { b: 1, c: 2}}]].filter(sift({ a: { b: 1} })) === [{a: {b: 1}], and [{a: 1, b: 1}, {a: 1}]].filter(sift({ a: 1 })) === [{a: 1, b: 1}, {a: 1}].

8.0.0 (from changelog)

  • DEPRECATED indexOf in favor of array.findIndex(sift(query))
  • second param is now options instead of select function. E.g: sift(query, { expressions: customExpressions, select: selectValue })
  • DEPRECATED sift(query, array). You must now use array.filter(sift(query))
  • Queries now expect exact object shape (based on #117). E.g: [{a: 1, b: 1}, {a: 1}]].filter(sift({ a: 1 })) === [{a: 1}]

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

🆕 @​types/bson (added, 4.0.5)

🆕 @​types/mongodb (added, 3.6.20)

🆕 bl (added, 2.2.1)

🆕 denque (added, 1.5.1)

🆕 optional-require (added, 1.0.3)

🆕 require-at (added, 1.0.6)

🗑️ emoji-regex (removed)


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants