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

Bump starlette version #1114

Open
ME-researchgroup opened this issue Feb 8, 2024 · 3 comments
Open

Bump starlette version #1114

ME-researchgroup opened this issue Feb 8, 2024 · 3 comments

Comments

@ME-researchgroup
Copy link

Hi!

Could you please bump starlette? It is currently locked at starlette = ">=0.17.1,<0.35.0"
There is a ReDoS vulnerability in versions of starlette lower than 36.2.

Thanks in advance!

@fralik
Copy link

fralik commented Feb 12, 2024

@wch
Copy link
Collaborator

wch commented Feb 13, 2024

A quick summary of where things are at the moment:

  • With the latest release of Posit Connect (2024.01.0), we can use any version of Starlette, including versions >=0.36.2
  • With older releases of Posit Connect, it requires Starlette <0.35.0. We introduced that version requirement in Pin starlette version below 0.35 #1009.

If we were to require >=0.36.2, then those who are using older versions of Connect will be unable to run Shiny for Python apps. The upgrade cycle time for Connect in organizations is often longer, on the scale of 6-12 months.

We will update this issue as we decide how to move ahead.

@wch
Copy link
Collaborator

wch commented Feb 13, 2024

It looks like the underlying issue is in python-multipart (GHSA-2jv5-9r88-3w3p), and there was a fix here, which was released in version 0.0.7.

However, even though that change to python-multipart fixes the DoS issue, the Starlette advisory still exists and apparently can't be deleted (Kludex/python-multipart#75 (comment)). That means that if we add a python-multipart>=0.0.7 requirement to py-shiny, that will fix the security issue, but users might still think there a security issue is present.

So we can do the following:

  • Add a python-multipart>=0.0.7 requirement
  • Un-pin starlette
  • In the rsconnect-python package, emit a message if Connect is <2024.01.0, and the user is deploying a py-shiny app with starlette>=0.35.0, saying that the app won't work, and they either need to upgrade Connect or downgrade starlette.

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

No branches or pull requests

3 participants