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 (medium)]: Synk, requests Information Exposure #352

Closed
rsforbes opened this issue Jun 14, 2023 · 0 comments · Fixed by #379
Closed

[Security (medium)]: Synk, requests Information Exposure #352

rsforbes opened this issue Jun 14, 2023 · 0 comments · Fixed by #379
Labels
security Items to address which improve the security of the api

Comments

@rsforbes
Copy link
Collaborator

rsforbes commented Jun 14, 2023

NBA API Version

v1.2.1

Issue

Todo:
Move requests to requests = "^2.31"

Goal: Move to a secure version of requests per the vulnerability and write tests to ensure backward compatibility with the existing API implementation.

[Vulnerability] (https://app.snyk.io/org/rsforbes/project/bb0647cd-7da5-4614-a126-36feab0558ce#issue-SNYK-PYTHON-REQUESTS-5595532):
Detailed paths and remediation
Introduced through: [email protected][email protected]
Fix: Upgrade requests to version 2.31.0
Security information
Factors contributing to the scoring:
Snyk: CVSS 6.1 - Medium Severity

NVD: CVSS 6.1 - Medium Severity
Why are the scores different? Learn how Snyk evaluates vulnerability scores
Overview
Affected versions of this package are vulnerable to Information Exposure by leaking Proxy-Authorization headers to destination servers during redirects to an HTTPS origin. This is a result of how rebuild_proxies is used to recompute and reattach the Proxy-Authorization header to requests when redirected.

NOTE: This behavior has only been observed to affect proxied requests when credentials are supplied in the URL user information component (e.g. https://username:password@proxy:8080), and only when redirecting to HTTPS:

HTTP → HTTPS: leak

HTTPS → HTTP: no leak

HTTPS → HTTPS: leak

HTTP → HTTP: no leak

For HTTP connections sent through the proxy, the proxy will identify the header in the request and remove it prior to forwarding to the destination server. However when sent over HTTPS, the Proxy-Authorization header must be sent in the CONNECT request as the proxy has no visibility into further tunneled requests. This results in Requests forwarding the header to the destination server unintentionally, allowing a malicious actor to potentially exfiltrate those credentials.

Code

No response

@rsforbes rsforbes added the security Items to address which improve the security of the api label Jun 14, 2023
@rsforbes rsforbes linked a pull request Oct 7, 2023 that will close this issue
@rsforbes rsforbes closed this as completed Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
security Items to address which improve the security of the api
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant