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] Fix for 1 vulnerabilities #1236

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

harunpehlivan
Copy link
Owner

This PR was automatically created by Snyk using the credentials of a real user.


Snyk has created this PR to fix one or more vulnerable packages in the `npm` dependencies of this project.

Changes included in this PR

  • Changes to the following files to upgrade the vulnerable dependencies to a fixed version:
    • packages/gatsby/package.json

Vulnerabilities that will be fixed

With an upgrade:
Severity Priority Score (*) Issue Breaking Change Exploit Maturity
low severity 461/1000
Why? Recently disclosed, Has a fix available, CVSS 3.5
Regular Expression Denial of Service (ReDoS)
SNYK-JS-DEBUG-3227433
Yes No Known Exploit

(*) Note that the real score may have changed since the PR was raised.

Commit messages
Package name: debug The new version differs by 43 commits.

See the full diff

Package name: serve The new version differs by 3 commits.

See the full diff

Check the changes in this PR to ensure they won't cause issues with your project.


Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report

🛠 Adjust project settings

📚 Read more about Snyk's upgrade and patch logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Regular Expression Denial of Service (ReDoS)

@secureflag-knowledge-base
Copy link

Open Redirect

Play SecureFlagPlay Labs on this vulnerability with SecureFlag!

Start Open Redirect Lab

Description

Open Redirects, otherwise known as Unvalidated Redirects and Forwards, are a class of vulnerability made possible when a web application, comprised of insufficient input-validation controls, is manipulated into redirecting unwitting users of the application to a malicious, attacker-controlled URL.

This type of exploit is popular with criminals involved in phishing and credential theft, unsurprising given the false layer of trust attributed to the fact that the modified link and the original site share the same server name.

Read more

Impact

There are many overlapping techniques criminals employ to dupe unwitting victims into handing over their hard-earned cash. One of these methods is undoubtedly betting on the misplaced trust many of us place in familiar server names. This write-up exemplifies how even the most arguably well-known URL of all, https://www.google.com, can be taken advantage of via its redirection facility.

In addition, Open Redirect vulnerabilities can:

  • Lead to Cross-Site Scripting (XSS) attacks if the redirect uses data: or javascript: protocols;
  • Potentially circumvent Server-Side Request Forgery (SSRF) filters;
  • Nullify allow list effectiveness in some cases to bypass Content Security Policy (CSP);
  • Lead to Carriage Return and Line Feed (CRLF) attacks if line breaks are present in the destination parameter.

Scenarios

As outlined above, attackers often use this attack as it 'hijacks' the trust users place in a well-known URL.

Here's a topical example from 2021; if the target domain is www.covidvaccinations.com, an attacker might craft the following URL:

http://www.covidvaccinations.com/redirect.php?url=http://attackerwebsite.com

Attackers send links like the one above in phishing campaigns in the hopes that they will lure a victim into clicking on the link.

Prevention

The following measures can be applied to either eliminate or drastically reduce the potential for Open Redirect exploitation:

  • If they aren't necessary, don't use redirects and forwards!
  • In cases where they are required, do not allow the URL as user input for the destination;
  • When user input is unavoidable, validate the supplied value, its appropriateness for the application, and ensure it is authorized for the user:
    • This can be a fiddly task, so closely adhere to best practices and ensure continued maintenance.
  • If possible, force the user to provide an ID or token that is mapped server-side to a complete target URL;
  • Input sanitization should be implemented by creating an allow list of trusted URLs determined by host or regex.

Testing

Verify that URL redirects and forwards only allow destinations which appear on an allow list, or show a warning when redirecting to potentially untrusted content.

View this in the SecureFlag Knowledge Base

@secure-code-warrior-for-github

Micro-Learning Topic: Regular expression denial of service (Detected by phrase)

Matched on "Regular Expression Denial of Service"

What is this? (2min video)

Denial of Service (DoS) attacks caused by Regular Expression which causes the system to hang or cause them to work very slowly when attacker sends a well-crafted input(exponentially related to input size).Denial of service attacks significantly degrade the service quality experienced by legitimate users. These attacks introduce large response delays, excessive losses, and service interruptions, resulting in direct impact on availability.

Try a challenge in Secure Code Warrior

Micro-Learning Topic: Denial of service (Detected by phrase)

Matched on "Denial of Service"

The Denial of Service (DoS) attack is focused on making a resource (site, application, server) unavailable for the purpose it was designed. There are many ways to make a service unavailable for legitimate users by manipulating network packets, programming, logical, or resources handling vulnerabilities, among others. Source: https://www.owasp.org/index.php/Denial_of_Service

Try a challenge in Secure Code Warrior

@secure-code-warrior-for-github

Micro-Learning Topic: Cross-site scripting (Detected by phrase)

Matched on "Cross-Site Scripting"

What is this? (2min video)

Cross-site scripting vulnerabilities occur when unescaped input is rendered into a page displayed to the user. When HTML or script is included in the input, it will be processed by a user's browser as HTML or script and can alter the appearance of the page or execute malicious scripts in their user context.

Try a challenge in Secure Code Warrior

Helpful references

Micro-Learning Topic: Open redirect (Detected by phrase)

Matched on "Open Redirect"

What is this? (2min video)

This vulnerability refers to the ability of an attacker to arbitrarily perform a redirection (external) or forward (internal) against the system. It arises due to insufficient validation or sanitisation of inputs used to perform a redirect or forward and may result in privilege escalation (in the case of a forward) or may be used to launch phishing attacks against users (in the case of redirects).

Try a challenge in Secure Code Warrior

Helpful references

Micro-Learning Topic: Server-side request forgery (Detected by phrase)

Matched on "Server-Side Request Forgery"

What is this? (2min video)

Server-Side Request Forgery (SSRF) vulnerabilities are caused when an attacker can supply or modify a URL that reads or sends data to the server. The attacker can create a malicious request with a manipulated URL, when this request reaches the server, the server-side code executes the exploit URL causing the attacker to be able to read data from services that shouldn't be exposed.

Try a challenge in Secure Code Warrior

Micro-Learning Topic: Unvalidated redirect (Detected by phrase)

Matched on "Unvalidated Redirect"

What is this? (2min video)

This vulnerability refers to the ability of an attacker to arbitrarily perform a redirection (external) or forward (internal) against the system. It arises due to insufficient validation or sanitisation of inputs used to perform a redirect or forward and may result in privilege escalation (in the case of a forward) or may be used to launch phishing attacks against users (in the case of redirects).

Try a challenge in Secure Code Warrior

Helpful references

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.

2 participants