connect-mongodb-session icon indicating copy to clipboard operation
connect-mongodb-session copied to clipboard

connect-mongodb-session depends on vulnerable versions of archetype

Open Kvikvne opened this issue 1 year ago • 10 comments

Issue Description:

I'm encountering a vulnerability issue with my Node.js project that involves the lodash.set package. Despite attempting the suggested fix via npm audit fix --force and manually addressing the vulnerable packages, the issue persists.

Problem:

The npm audit identifies a high severity vulnerability related to Prototype Pollution in lodash.set. However, the fix provided via npm audit fix --force does not resolve the vulnerability. Manually updating the affected packages also fails to mitigate the issue.

Steps Taken:

  • Ran npm audit fix --force to apply the suggested fix.
  • Manually updated the affected packages (lodash.set, archetype, and connect-mongodb-session) to their latest versions.

Audit Output:

lodash.set  *
Severity: high
Prototype Pollution in lodash - https://github.com/advisories/GHSA-p6mc-m468-83gw
fix available via `npm audit fix --force`
Will install [email protected], which is a breaking change
node_modules/lodash.set
  archetype  >=0.8.7
  Depends on vulnerable versions of lodash.set
  node_modules/archetype
    connect-mongodb-session  >=2.3.0
    Depends on vulnerable versions of archetype
    node_modules/connect-mongodb-session

3 high severity vulnerabilities

To address all issues (including breaking changes), run:
  npm audit fix --force

Kvikvne avatar Feb 01 '24 20:02 Kvikvne

+1 Also seeing this issue

kevnwang avatar Feb 04 '24 10:02 kevnwang

force fix doesn't fix it, cause it wants to downgrade you to version 2.2.0 archetype looks to be a dead package, that depends on the dead lodash.set package (8years now) and this issue was never fixed in that package, it was fixed in the main lodash package though.

changing archetype to use lodash instead of lodash.clonedeep and lodash.set would resolve the issue.

patrickdk77 avatar Feb 13 '24 06:02 patrickdk77

actually here is a quickfix: npm install https://github.com/LaurentGoderre/archetype.git#fix-lodash_set-vuln

patrickdk77 avatar Feb 13 '24 07:02 patrickdk77

Any chance this will be fixed?

drscottlobo avatar Apr 11 '24 20:04 drscottlobo

Can we get a fix for this?

joshuawwright avatar Apr 17 '24 13:04 joshuawwright

I just got an orange card during a code audit. Please handle this security point.

eviltik avatar May 16 '24 12:05 eviltik

Is there anything in the pipeline to get this issue fixed? This is popping up in all of our security approval requests. We will have to find alternatives if this doesn't get fixed soon enough.

Can we increase the priority for this issue?

rahulk3010 avatar Aug 16 '24 11:08 rahulk3010

Is there anything in the pipeline to get this issue fixed? This is popping up in all of our security approval requests. We will have to find alternatives if this doesn't get fixed soon enough.

Can we increase the priority for this issue?

Have you tried the fix mentioned above? That will fix the issue:

https://github.com/mongodb-js/connect-mongodb-session/issues/113#issuecomment-1940537609

npm install https://github.com/LaurentGoderre/archetype.git#fix-lodash_set-vuln

luckycreationsindia avatar Sep 09 '24 07:09 luckycreationsindia

Is there anything in the pipeline to get this issue fixed? This is popping up in all of our security approval requests. We will have to find alternatives if this doesn't get fixed soon enough. Can we increase the priority for this issue?

Have you tried the fix mentioned above? That will fix the issue:

#113 (comment)

npm install https://github.com/LaurentGoderre/archetype.git#fix-lodash_set-vuln

I was looking for an official fix.

Fortunately, there is a fix provided by archetype recently with version 0.13.1,

  • https://github.com/boosterfuels/archetype/pull/28

So I could do something like this,

"overrides": {
    "archetype": "^0.13.1"
}

rahulk3010 avatar Sep 20 '24 12:09 rahulk3010

I just noticed this seems to have resolved itself on my end by automatically utilizing [email protected], so it doesn't look like we need to do anything special (unofficial or otherwise) to get around it now.

thekevinhunt avatar Oct 03 '24 21:10 thekevinhunt