Fix: 1 security vulnerabilities in openredirect.py
Open
adithyan-ak
opened this issue 7 months ago
•
0 comments
Security Fixes\n\nThis PR fixes 1 security vulnerabilities:\n\n- vuln_d7ee0a7aa9cf43e091849fae0a0dc3c2: Validated and sanitized the host input using urlparse to ensure it is a valid hostname. Validated the port and returned early if invalid. Used a scheme variable instead of reassigning port variable. Implemented an allowlist for hosts to prevent SSRF by checking that constructed URLs only contain the allowed host. Sanitized payloads read from redirectpayloads.txt by stripping whitespace and skipping empty lines. Added exception handling around network calls and file reading to handle errors gracefully. Skipped payloads that would cause requests to disallowed hosts.\n\n---\nGenerated by ByteArmor