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

CVE-2023-28155 #27

Closed
khitrenovich opened this issue Mar 23, 2023 · 17 comments
Closed

CVE-2023-28155 #27

khitrenovich opened this issue Mar 23, 2023 · 17 comments

Comments

@khitrenovich
Copy link

Being a fork of the original request package, @cypress/request is vulnerable to CVE-2023-28155 (SSRF via insecure redirects). There is an issue and an open PR in the request repo, but the fix is unlikely to be merged since request is long abandoned. This fork is the second most popular fork, it would be great to have it patched.

@legobeat
Copy link

legobeat commented Mar 25, 2023

Ported over to in #28 (functionally equivalent to request#3444) and #30 (retains current non-safe defaults but exposes the same new option)

@MikeMcC399
Copy link

For @cypress/request@2.88.12 (currently the latest version)

npm audit on cypress@12.17.3 and earlier versions reports:

@cypress/request  *
Severity: moderate
Server-Side Request Forgery in Request - https://github.com/advisories/GHSA-p8p7-x288-28g6
Depends on vulnerable versions of tough-cookie
fix available via `npm audit fix --force`
Will install cypress@4.2.0, which is a breaking change
node_modules/@cypress/request
  cypress  >=4.3.0
  Depends on vulnerable versions of @cypress/request
  node_modules/cypress

Reference

@MikeMcC399
Copy link

If / when this is resolved, then it would make sense to also update

https://github.com/cypress-io/cypress/blob/develop/cli/package.json#L23 currently showing

"@cypress/request": "^2.88.11",

because otherwise updating an installed instance of Cypress does not pull in the latest version of @cypress/request.

@nagash77
Copy link

nagash77 commented Aug 3, 2023

Hi @MikeMcC399 we are working on that change at the moment. Hoping to have it ready to merge and deploy in the near future.

@MikeMcC399
Copy link

Hi Ben @nagash77

Thanks for the progress update! 👍🏻

@MikeMcC399
Copy link

@ST-DDT
Copy link

ST-DDT commented Aug 8, 2023

Here is the PR that adds the new release to cypress itself:

@MikeMcC399
Copy link

@khitrenovich

@khitrenovich
Copy link
Author

We stopped using @cypress/request since the issue was opened, so I won't be able to verify that. I hope one of the people who upvoted the issue (more than dozen as of today) could chime in and help.

@heloufir
Copy link

heloufir commented Aug 10, 2023

Hello @MikeMcC399
I can confirm that there is no vulnerability alert when I run npm audit fix after I changed the version of @cypress/request to 3.0.0 in my projet.

For my case I am using cypress to do e2e testing, and I was having the npm vulnerability alert, but after I added the below code to my package.json file, the alert is gone! thanks a lot to dev team:

Dependencies used in my project:

{
  "devDependencies": {
    "@cypress/schematic": "latest",
    "@cypress/xpath": "^2.0.3",
    "cypress": "latest",
    "@badeball/cypress-cucumber-preprocessor": "latest",
    "@bahmutov/cypress-esbuild-preprocessor": "latest",
  },
}

Cypress request override (forced to use the new version):

{
  "overrides": {
    "@cypress/request": "^3.0.0"
  }
}

@OleksiiKachan
Copy link

if you are using yarn then instead of overrides use resolutions

  "resolutions": {
    "@cypress/request": "^3.0.0"
  }

@MikeMcC399
Copy link

@nbouvrette
Copy link

This will be fixed on Cypress when cypress-io/cypress#27495 is merged.

@verheyenkoen
Copy link

This will be fixed on Cypress when cypress-io/cypress#27495 is merged.

Appears to be a breaking change according to #37 cypress-io/cypress#27495 (comment). Will have to wait for Cypress 13 to be fully fixed.

@MikeMcC399
Copy link

MikeMcC399 commented Aug 22, 2023

This issue is about the vulnerability in @cypress/request which was fixed in @cypress/request@3.0.0.

To confirm that no vulnerability is reported when using @cypress/request@3.0.0:

mkdir cy-request-test
cd cy-request-test
npm init -y
npm install @cypress/request
npm ls
npm audit

shows:

cy-request-test@1.0.0
└── @cypress/request@3.0.0

found 0 vulnerabilities

So from a formal point of view this issue could be closed. It may however be helpful to leave it open until the issue has been fixed in Cypress itself.


The vulnerability in Cypress 12.x was reported in

@MikeMcC399
Copy link

Cypress 13.0.0 changelog for the version released today, Aug 29, 2023, states:

Dependency Updates:

There should be no further barriers to closing this issue.

@chrisbreiding
Copy link

Released in Cypress 13.0.0.

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

No branches or pull requests

10 participants