Skip to content

Support tools that require oauth #32

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

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open

Support tools that require oauth #32

wants to merge 24 commits into from

Conversation

imranq2
Copy link

@imranq2 imranq2 commented Apr 22, 2025

No description provided.

Comment on lines +176 to +178
token_response = requests.post(
well_known_configuration.token_endpoint, data=token_data
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential user input in HTTP request may allow SSRF attack - medium severity
If an attacker can control the URL input leading into this HTTP request, the attack might be able to perform an SSRF attack. This kind of attack is even more dangerous if the application returns the response of the request to the user. It could allow them to retrieve information from higher privileged services within the network (such as the metadata service, which is commonly available in cloud services, and could allow them to retrieve credentials).

Remediation - medium confidence
This patch mitigates the opening of potentially unsafe URLs by implementing validation for URLs passed to urllib_urlopen.

Suggested change
token_response = requests.post(
well_known_configuration.token_endpoint, data=token_data
)
token_endpoint = well_known_configuration.token_endpoint
if not token_endpoint.startswith(('https://', 'http://')):
raise ValueError("Invalid token endpoint URL")
token_response = requests.post(token_endpoint, data=token_data)

View details in Aikido Security

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

Successfully merging this pull request may close these issues.

1 participant