yurikrupnik / mussia5-next

mussia5-next.yurikrupnik.vercel.app
1 stars 2 forks source link

🚨 [security] Update mongoose 5.12.3 → 5.13.22 (minor) #294

Open depfu[bot] opened 4 months ago

depfu[bot] commented 4 months ago

🚨 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 upgrade. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ mongoose (5.12.3 → 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.

↗️ @​types/bson (indirect, 4.0.3 → 4.0.5) · Repo

Sorry, we couldn't find anything useful about this release.

↗️ @​types/mongodb (indirect, 3.6.11 → 3.6.20) · Repo

Sorry, we couldn't find anything useful about this release.

↗️ mpath (indirect, 0.8.3 → 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

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

Commits

See the full diff on Github. The new version differs by 3 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.

🆕 require-at (added, 1.0.6)


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)
secure-code-warrior-for-github[bot] commented 4 months ago

Micro-Learning Topic: Denial of service (Detected by phrase)

Matched on "Denial of Service"

The Denial of Service (DoS) attack is focused on making a resource (site, application, server) unavailable for the purpose it was designed. There are many ways to make a service unavailable for legitimate users by manipulating network packets, programming, logical, or resources handling vulnerabilities, among others. Source: https://www.owasp.org/index.php/Denial_of_Service

Try a challenge in Secure Code Warrior

Micro-Learning Topic: Prototype pollution (Detected by phrase)

Matched on "Prototype Pollution"

What is this? (2min video)

By adding or modifying attributes of an object prototype, it is possible to create attributes that exist on every object, or replace critical attributes with malicious ones. This can be problematic if the software depends on existence or non-existence of certain attributes, or uses pre-defined attributes of object prototype (such as hasOwnProperty, toString or valueOf).

Try a challenge in Secure Code Warrior

Micro-Learning Topic: Type confusion (Detected by phrase)

Matched on "Type confusion"

What is this? (2min video)

When attackers are able to manipulate the memory reserved for objects directly, they can then pass a reference to a crafted block of memory to be used in the place of a valid object type. This triggers the run time engine to execute arbitrary code which is under the control of the attacker due to the induced type confusion.

Try a challenge in Secure Code Warrior

sonarcloud[bot] commented 4 months ago

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