Products

Solutions

Resources

Search for API Security Tests

/

/

CORS Whitelist Origin Validation

CORS Whitelist Origin Validation

Validates the Cross-Origin Resource Sharing (CORS) whitelist, ensuring only authorized origins are included, enhancing application security.

Cross-Origin Resource Sharing (CORS)

Business Logic

"This test validates the configuration of Cross-Origin Resource Sharing (CORS) by exploiting the whitelist of allowed origins." "It ensures that only authorized domains are included in the whitelist, preventing potential security risks and unauthorized access to resources, bolstering the overall security posture of the application"

"This test validates the configuration of Cross-Origin Resource Sharing (CORS) by exploiting the whitelist of allowed origins." "It ensures that only authorized domains are included in the whitelist, preventing potential security risks and unauthorized access to resources, bolstering the overall security posture of the application"

Impact of the vulnerability

Impact of the vulnerability

"A misconfigured CORS can have significant impact on web application security." "If invalid origin values are not properly handled, it may allow unauthorized access to sensitive resources, leading to" "data breaches, cross-site scripting (XSS) attacks, or unauthorized data manipulation, compromising the integrity and confidentiality of the system."

"A misconfigured CORS can have significant impact on web application security." "If invalid origin values are not properly handled, it may allow unauthorized access to sensitive resources, leading to" "data breaches, cross-site scripting (XSS) attacks, or unauthorized data manipulation, compromising the integrity and confidentiality of the system."

How this template works

APIs Selection

The API selection filters in this template specify the criteria for selecting the API requests to be executed. In this case, the filters include checking the response code to be greater than or equal to 200 and less than 300, and extracting the value of the "Host" header as "host_val".

Execute request

The execute section defines the type of request to be executed, which is a single request in this case. It also specifies the request headers to be added, where the "origin" header is set to "${host_val}.evil.com". This simulates a potential attack by setting a malicious origin.

Validation

The validation section defines the criteria for validating the response of the executed request. It checks that the response code is within the range of 200 to 300. It also verifies that the response headers contain either the "access-control-allow-origin" header with a value containing "${host_val}.evil.com" and the "access-control-allow-credentials" header with a value containing "true". This ensures that the CORS whitelist is properly configured and does not allow unauthorized origins.

Frequently asked questions

What is the purpose of the CORS Whitelist Origin Validation test

How does the CORS Whitelist Origin Validation test enhance application security

What impact can a misconfigured CORS have on web application security

What category does the CORS Whitelist Origin Validation test belong to

What severity level is assigned to the CORS Whitelist Origin Validation test

What are some of the tags associated with the CORS Whitelist Origin Validation test

Loved by security teams!

Loved by security teams!

Product Hunt Badge

"We are absolutely thrilled with the testing feature of Akto. We have used it on our graphQL endpoints and it performs flawlessly identifying common API security issues. It's truly a game-changer and we highly recommend Akto to anyone looking to effortlessly secure their API endpoints. With a user-friendly interface, it's the perfect solution for anyone looking to embrace custom rules with context to reduce false positives."

Loom Company logo

Security team,

Loom

"We are absolutely thrilled with the testing feature of Akto. We have used it on our graphQL endpoints and it performs flawlessly identifying common API security issues. It's truly a game-changer and we highly recommend Akto to anyone looking to effortlessly secure their API endpoints. With a user-friendly interface, it's the perfect solution for anyone looking to embrace custom rules with context to reduce false positives."

Loom Company logo

Security team,

Loom

"The text editor in Akto is absolutely remarkable. Its user-friendly YAML format strikes the perfect balance between simplicity and power. With intuitive features like 'API selection filter', 'Execute', Validate' creating test rules becomes incredibly easy. Akto's test editor is a game-changer, enabling seamless creation of highly personalized and effective tests that could meet the needs of any modern day organization. "

Rippling Company logo

Security team,

Rippling

Suggest API security tests

Suggest API security tests

We're actively building the test library. Suggest a test! If we like your suggestion, you will see it in the library in few days.

We're actively building the test library. Suggest a test! If we like your suggestion, you will see it in the library in few days.