CVE-2022-0536 Exposure of Sensitive Information to an Unauthorized Actor in NPM follow-redirects prior to 1.14.8.

CVE-2022-0536 Exposure of Sensitive Information to an Unauthorized Actor in NPM follow-redirects prior to 1.14.8.

If a web application sends follow-redirects via an insecure connection, it is possible that an attacker could intercept these redirects and send unauthorized requests to the application’s backend. If the application follows these redirects, it may expose information to the attacker.

Redirects are particularly dangerous because they may be sent over an insecure connection. For example, if the application communicates with a database server via SQL, it may be possible for an attacker to intercept the redirection URL and send unauthorized requests to the database. Redirects are sent by the browser and not by the application, so it is the responsibility of the application to check the validity of the redirect URL.

How Websites Could Be Vulnerable to Unauthorized Request Attacks

The problem of unauthorized request attacks is that it is difficult for developers to detect them. The best way to avoid unauthorized request attacks is by ensuring that you are following the proper development practices for your application.

For example, if an application sends HTTP requests via HTTPS, it will not be vulnerable to this type of attack. Additionally, if the application uses a secure connection (HTTPS), it can be sure that those requests are coming from the legitimate website and not someone else who is trying to intercept them. If the application redirects HTTP requests to HTTPS, it will also not be vulnerable to this type of attack. Another example would be if your application includes an X-Frame-Options header which causes browsers to show a warning message when framing your page in another web page. This restricts how people could use your website as a frame on their own web page, so you won’t need extra code or headers at the end of your URL to protect against unauthorized requests.

CVE-2022-0567

If an application does not properly validate the origin of a request, it is possible for an attacker to send unauthorized requests to the application’s backend. For example, if the application relies on a user’s input to determine if a request should be allowed, then it must verify that this input actually came from the intended user. If this input was not validated properly, then it is possible that an attacker could use this vulnerability to send unauthorized requests to the backend.

Another example would be an application that handles sensitive information like payments or social security numbers. If these data types are externally provided without validation, such as through a URL parameter (as in credit card number), then they could be sent over an insecure connection and exposed to attackers. The application should always check whether or not the data being passed in is valid before accepting it.

Fixing the Vulnerability

The vulnerability can be fixed by ensuring that the redirection URLs are only followed over secure connections.

An attack may also be prevented if the application implements a "follow-redirects" feature that prevents any redirects to be followed unless they are sent over a secure connection.

References

Subscribe to CVE.news
Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe