Description
OpenAEV has a CSRF protection mechanism which is enabled when the incoming request includes any cookie.
Some injectors use requests.Session as a http client for communicating with OpenAEV server. Such requests may create a Set-Cookie: "JESSIONID=xxxx" in the response, and requests.Session then stores it in-memory and sends it with any subsequent request.
Injectors design does not expect injector processes to complete a CSRF challenge, but to always authenticate requests explicitly via Authorization: Bearer ... and the configured OPENAEV_TOKEN config.
Environment
- OS (where OpenAEV server runs): { e.g. Mac OS 10, Windows 10, Ubuntu 16.4, etc. }
- OpenAEV version: { e.g. OpenAEV 1.0.2 }
- OpenAEV client: { e.g. frontend or python }
- Other environment details:
Reproducible Steps
Steps to create the smallest reproducible scenario:
- Use CSRF-protection enabled branch instance
- Use the
http-query injector (discovered impacted injector)
Expected Output
Injectors work while CSRF protection is active on OpenAEV
Actual Output
401/403 due to failed CSRF challenge on injectors that mistakenly send cookies with requests.
Additional information
Screenshots (optional)
Description
OpenAEV has a CSRF protection mechanism which is enabled when the incoming request includes any cookie.
Some injectors use
requests.Sessionas a http client for communicating with OpenAEV server. Such requests may create aSet-Cookie: "JESSIONID=xxxx"in the response, andrequests.Sessionthen stores it in-memory and sends it with any subsequent request.Injectors design does not expect injector processes to complete a CSRF challenge, but to always authenticate requests explicitly via
Authorization: Bearer ...and the configuredOPENAEV_TOKENconfig.Environment
Reproducible Steps
Steps to create the smallest reproducible scenario:
http-queryinjector (discovered impacted injector)Expected Output
Injectors work while CSRF protection is active on OpenAEV
Actual Output
401/403 due to failed CSRF challenge on injectors that mistakenly send cookies with requests.
Additional information
Screenshots (optional)