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

Update Flask to work with Werkzeug 2.2.3 due to open CVE #5021

Closed
rootVIII opened this issue Mar 9, 2023 · 6 comments
Closed

Update Flask to work with Werkzeug 2.2.3 due to open CVE #5021

rootVIII opened this issue Mar 9, 2023 · 6 comments

Comments

@rootVIII
Copy link

rootVIII commented Mar 9, 2023

Hello Flask Team:

I am aware that bug reports regarding sub-dependencies may not be welcome here, but I feel that this is too important (in my case it's most likely a complete show-stopper).

We have invested a significant amount of time building Rest APIs and webapps with Flask, and our CICD pipeline incorporates a well-known vulnerability scanner. Our build pipeline fails due to an open CVE in Werkzeug: https://nvd.nist.gov/vuln/detail/CVE-2023-23934

There are only two known versions of Werkzeug that do not have an associated CVE: 2.2.0 and the latest 2.2.3. However due to the issue ImportError: cannot import name 'parse_rule' from 'werkzeug.routing' we cannot update Werkzeueg to 2.2.3.

The recommended solution is to downgrade to Werkzeug to 2.1.2 (I believe) and that does work. However that version and all previous versions have CVEs.

Is it possible to make Flask work with the newest Werkzeug 2.2.3? As of now we cannot push any new changes into production and are basically stuck until Flask works with the newest version of Werkzeug. I could be mistaken but I think this may be the case.

And as always, thank you for the support.

Environment:

  • Python version: 3.8
  • Flask version: 2.2.3 (newest Flask at the time of writing this issue)
@rootVIII rootVIII changed the title Update Flask to work with Werkzeug 2.2.3 do to open CVE Update Flask to work with Werkzeug 2.2.3 due to open CVE Mar 9, 2023
@davidism
Copy link
Member

davidism commented Mar 9, 2023

Flask works fine with Werkzeug 2.2.3.

It sounds like another library you're using is incompatible with recent releases. For example, in the question you linked, the error is coming from Flask-RestX, which I'm fairly sure was updated a while ago.

@davidism davidism closed this as completed Mar 9, 2023
@davidism
Copy link
Member

davidism commented Mar 9, 2023

Note that the vulnerability you linked is "Low", and requires a confluence of other vulnerabilities in other places to actually get to the point of mattering in Werkzeug itself.

@rootVIII
Copy link
Author

rootVIII commented Mar 9, 2023

Actually is this for flask-restx? (someone else's project) or is it for Flask as well? It's a bit hard to tell in the logs.
Unfortunately, even the "low" ones are flagged for us :( My apologies if this is actually related to restx.

@davidism
Copy link
Member

davidism commented Mar 9, 2023

It's for whatever is trying to do that import that no longer exists. You didn't show a traceback, so I can't say what it is, but it's not Flask itself.

@rootVIII
Copy link
Author

rootVIII commented Mar 9, 2023

Okay thank you @davidism will close and reopen with flask-restx. The error is actually from when importing their library, but I was mistaken thinking that it was actually coming from their usage of Flask.

@davidism
Copy link
Member

davidism commented Mar 9, 2023

It was already reported to Flask-RestX in python-restx/flask-restx#460, fixed in python-restx/flask-restx#463, which seems to have been released in Flask-RestX 1.0.0 in November 2022.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants