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

Snyk vulnerability [SNYK-JS-FOLLOWREDIRECTS-6141137] #22062

Closed
github-actions bot opened this issue Jan 1, 2024 · 0 comments
Closed

Snyk vulnerability [SNYK-JS-FOLLOWREDIRECTS-6141137] #22062

github-actions bot opened this issue Jan 1, 2024 · 0 comments
Labels
help wanted Help/Contributions wanted from community members snyk-vulnerability

Comments

@github-actions
Copy link
Contributor

github-actions bot commented Jan 1, 2024

Affecting Packages/Plugins

Overview

Affected versions of this package are vulnerable to Improper Input Validation due to the improper handling of URLs by the url.parse() function. When new URL() throws an error, it can be manipulated to misinterpret the hostname. An attacker could exploit this weakness to redirect traffic to a malicious site, potentially leading to information disclosure, phishing attacks, or other security breaches.

PoC

# Case 1 : Bypassing localhost restriction
let url = 'http://[localhost]/admin';
try{
    new URL(url); // ERROR : Invalid URL
}catch{
    url.parse(url); // -> http://localhost/admin
}

# Case 2 : Bypassing domain restriction
let url = 'http://attacker.domain*.allowed.domain:a';
try{
    new URL(url); // ERROR : Invalid URL
}catch{
    url.parse(url); // -> http://attacker.domain/*.allowed.domain:a
}

Remediation

Upgrade follow-redirects to version 1.15.4 or higher.

References

@github-actions github-actions bot added help wanted Help/Contributions wanted from community members snyk-vulnerability labels Jan 1, 2024
@github-actions github-actions bot closed this as completed Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Help/Contributions wanted from community members snyk-vulnerability
Projects
None yet
Development

No branches or pull requests

0 participants