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 tough-cookie dependency to 4.1.3 #32

Merged
merged 5 commits into from Aug 1, 2023

Conversation

BreakBB
Copy link

@BreakBB BreakBB commented Jul 10, 2023

PR Checklist:

PR Description

As described in #31, the tough-cookie dependency had a prototype pollution issue before v4.1.3. This PR updates the tough-cookie dependency to fix this.

@LubosK
Copy link

LubosK commented Jul 11, 2023

Hi @tgriesser , could you or someone from the team take a look at this PR? Thx in andvance

@tim-bezhashvyly
Copy link

+1

@LubosK
Copy link

LubosK commented Jul 13, 2023

We've also just got our pipeline audit job stalled by this ):

You can temporary solved it by adding tough-cookie to resolutions in package.json.
e.g.
"resolutions": { "tough-cookie": "^4.1.3" },

@tim-bezhashvyly
Copy link

tim-bezhashvyly commented Jul 13, 2023

For npm

"overrides": {
  "tough-cookie": "^4.1.3"
}

works as a temporary fix.

@GoudekettingRM
Copy link

Bump

@herleraja
Copy link

any update on this PR approval ?

edavey added a commit to ministryofjustice/hmpps-community-accommodation-tier-2-ui that referenced this pull request Jul 24, 2023
The recently upgrade cypress installation (`12.7.1` ->
`12.7.2`) has resulted in a vulnerability warning:

https://app.circleci.com/pipelines/github/ministryofjustice/hmpps-community-accommodation-tier-2-ui/519/workflows/4ea28190-5859-4266-87de-6c4ff38d402d/jobs/1381

This is [CWE 1321](https://github.com/advisories?query=cwe%3A1321)

[tough-cookie Prototype Pollution vulnerability](GHSA-72xf-g2v4-qvf3)

and comes from cypress' `@cypress/request package`

This has not yet been fixed in cypress though there's a PR:

cypress-io/request#32

We declare a temporary 'override' in `package.json` to force
this upgrade.
edavey added a commit to ministryofjustice/hmpps-community-accommodation-tier-2-ui that referenced this pull request Jul 24, 2023
The recently upgraded cypress installation (`12.7.1` ->
`12.7.2`) has resulted in a vulnerability warning:

https://app.circleci.com/pipelines/github/ministryofjustice/hmpps-community-accommodation-tier-2-ui/519/workflows/4ea28190-5859-4266-87de-6c4ff38d402d/jobs/1381

This is [CWE 1321](https://github.com/advisories?query=cwe%3A1321)

[tough-cookie Prototype Pollution vulnerability](GHSA-72xf-g2v4-qvf3)

and comes from cypress' `@cypress/request package`

This has not yet been fixed in cypress though there's a PR
waiting to be merged:

cypress-io/request#32

We declare a temporary 'override' in `package.json` to force
this upgrade.
@jeffsays
Copy link

bump - any chance this gets fixed soon @tgriesser?

@anthony-b-dev
Copy link

needing this approved and merged in as well please

Copy link

@herleraja herleraja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. But it needs approval from the maintainer.

@MikeMcC399
Copy link

MikeMcC399 commented Aug 1, 2023

I have added related issues which affect the repo without this PR

yarn add tough-cookie

to update to ^4.1.3 causes an additional failure under Node.js 20 - installing and testing with Yarn (although it is already failing without the change).

@MikeMcC399
Copy link

npm install
npm audit --omit=dev

shows

found 0 vulnerabilities

with this PR. 👍🏻

@nagash77
Copy link

nagash77 commented Aug 1, 2023

Hi everyone, sorry for the late response. This PR was not seen by our team. I am having someone take a look to get this PR ready for merge if possible. I see some failing checks at the moment. Thank you for your patience.

jobs:
build:
name: Install and test with yarn
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To get the tests to pass, you need to use Node.js 16.

- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18"
Copy link

@MikeMcC399 MikeMcC399 Aug 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
node-version: "18"
node-version: 16.16.0

This matches Cypress' .node-version.

@nagash77 nagash77 merged commit bfbb95f into cypress-io:master Aug 1, 2023
2 checks passed
fullsushidev added a commit to RedHatInsights/tower-analytics-frontend that referenced this pull request Aug 1, 2023
cypress issue will be fixed after:
cypress-io/request#32
@cypress-app-bot
Copy link

🎉 This PR is included in version 2.88.12 🎉

The release is available on:

Your semantic-release bot 📦🚀

@G-Rath
Copy link

G-Rath commented Aug 1, 2023

@nagash77 in case you've not seen it, there's also GHSA-p8p7-x288-28g6 which needs addressing - there is #30 and #28 open for that

@BreakBB BreakBB deleted the fix-cve-2023-26136 branch August 2, 2023 05:09
fullsushidev added a commit to RedHatInsights/tower-analytics-frontend that referenced this pull request Aug 7, 2023
cypress issue will be fixed after:
cypress-io/request#32
fullsushidev added a commit to RedHatInsights/tower-analytics-frontend that referenced this pull request Aug 7, 2023
cypress issue will be fixed after:
cypress-io/request#32
fullsushidev added a commit to RedHatInsights/tower-analytics-frontend that referenced this pull request Aug 9, 2023
cypress issue will be fixed after:
cypress-io/request#32
dmzoneill pushed a commit to RedHatInsights/tower-analytics-frontend that referenced this pull request Aug 9, 2023
cypress issue will be fixed after:
cypress-io/request#32
fullsushidev added a commit to RedHatInsights/tower-analytics-frontend that referenced this pull request Aug 9, 2023
cypress issue will be fixed after:
cypress-io/request#32
fullsushidev added a commit to RedHatInsights/tower-analytics-frontend that referenced this pull request Aug 15, 2023
cypress issue will be fixed after:
cypress-io/request#32
fullsushidev added a commit to RedHatInsights/tower-analytics-frontend that referenced this pull request Aug 17, 2023
cypress issue will be fixed after:
cypress-io/request#32
fullsushidev added a commit to RedHatInsights/tower-analytics-frontend that referenced this pull request Aug 17, 2023
cypress issue will be fixed after:
cypress-io/request#32
fullsushidev added a commit to RedHatInsights/tower-analytics-frontend that referenced this pull request Sep 1, 2023
cypress issue will be fixed after:
cypress-io/request#32
fullsushidev added a commit to RedHatInsights/tower-analytics-frontend that referenced this pull request Sep 6, 2023
cypress issue will be fixed after:
cypress-io/request#32
fullsushidev added a commit to RedHatInsights/tower-analytics-frontend that referenced this pull request Sep 11, 2023
cypress issue will be fixed after:
cypress-io/request#32
fullsushidev added a commit to RedHatInsights/tower-analytics-frontend that referenced this pull request Sep 19, 2023
cypress issue will be fixed after:
cypress-io/request#32
fullsushidev added a commit to RedHatInsights/tower-analytics-frontend that referenced this pull request Sep 21, 2023
cypress issue will be fixed after:
cypress-io/request#32
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.

Vulnerable version of tough-cookie in use (2.5.0) CVE-2023-26136