CORS (cross-origin ressource sharing) can be used to protect webapps from CSRF, before accepting a request, the server verifies that the host specified in the Origin header is among the hosts allowed in CORS Access-Control-Allow-Origin header.
if so, then can we bypass the CORS protection by setting a custom Origin header in the CSRF exploit ? example :
<?php
header('Origin: www.already-allowed-website.net');
/* the rest of a simple POST CSRF exploit... */
?>