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

Report of Open Redirect Vulnerability in Python 3.9.11 - Utilizing Simple HTTP #118312

Closed
barttran2k opened this issue Apr 26, 2024 · 6 comments
Closed
Labels
type-bug An unexpected behavior, bug, or error type-security A security issue

Comments

@barttran2k
Copy link

barttran2k commented Apr 26, 2024

Bug report

Bug description:

Vulnerability Details:

  • Affected Version: Python 3.9.11
  • Vulnerability Type: Open Redirect
  • Payload: //interact.sh/%2f..

Description:
During our testing and analysis, we identified that when using Simple HTTP in Python 3.9.11 with the payload //interact.sh/%2f.., an open redirect vulnerability arises. This could potentially allow attackers to redirect users to malicious websites or resources, leading to phishing attacks or the exploitation of sensitive information.

Steps to Reproduce:

  1. Set up a server using Python 3.9.11 with Simple HTTP.
  2. Craft a payload containing //interact.sh/%2f..
  3. Attempt to access the server with the crafted payload.
  4. Observe the redirection behavior.

Impact:
This vulnerability poses a significant risk to the security of applications and systems utilizing Python 3.9.11, as it can be exploited by malicious actors to perform various attacks, including phishing and unauthorized access to sensitive information.

CPython versions tested on:

3.9

Operating systems tested on:

Linux, macOS, Windows

@barttran2k barttran2k added the type-bug An unexpected behavior, bug, or error label Apr 26, 2024
@barttran2k barttran2k changed the title Report of Open Redirect Vulnerability in Python 3.9.11 - Utilizing Simple HTTP with Payload Report of Open Redirect Vulnerability in Python 3.9.11 - Utilizing Simple HTTP Apr 26, 2024
@ericvsmith
Copy link
Member

Please provide sample code.

@AlexWaygood AlexWaygood added the type-security A security issue label Apr 26, 2024
@barttran2k
Copy link
Author

image

@ericvsmith
Copy link
Member

Thanks. For those using screen readers, it would be better to not paste an image. For reference, the command line is:

python -m http.server 9999

The documentation for the http module states:
Warning http.server is not recommended for production. It only implements basic security checks.

@tunedal
Copy link
Contributor

tunedal commented Apr 27, 2024

I think this is a duplicate of issue #87389 which was fixed in Python 3.9.14. When I apply that patch to 3.9.2, the example here (GET //fb.com/%2f..) is not reproducible anymore.

@ericvsmith
Copy link
Member

Thanks for verifying, @tunedal. I'll wait a little while and then close this.

@barttran2k: Does this resolve your issue?

@barttran2k
Copy link
Author

I have checked the fix information again and it is true that it has been fixed since 3.9.14. Thank you @tunedal @ericvsmith

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error type-security A security issue
Projects
None yet
Development

No branches or pull requests

4 participants