Skip to content

Conversation

@RinCodeForge927
Copy link

Problem

The previous implementation constructed a PowerShell command using string formatting with the auth_uri. This pattern is susceptible to argument injection, potentially allowing arbitrary code execution if the auth_uri is controlled by an attacker.

Solution

The vulnerable code block has been removed. The library now relies solely on Python's standard webbrowser module, which handles URL opening safely and is the preferred method for cross-platform compatibility.

The existing fallback mechanism uses subprocess.call with an unescaped formatted string to invoke Start-Process. This introduces a command injection vulnerability where a malicious auth_uri can execute arbitrary PowerShell commands.

This patch removes the vulnerable fallback path entirely. The webbrowser standard library is sufficient for handling URL opening across platforms.
@RinCodeForge927 RinCodeForge927 requested a review from a team as a code owner December 30, 2025 13:26
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