GSA / smartpay-training

Prototype for new GSA SmartPay training quizzes
8 stars 4 forks source link

Dependabot Alert: Undici's cookie header not cleared on cross-origin redirect in fetch #472

Open JennaySDavis opened 6 months ago

JennaySDavis commented 6 months ago

Upgrade undici to fix 1 Dependabot alert in training-front-end/package-lock.json

Impact Undici clears Authorization headers on cross-origin redirects but does not clear Cookie headers. By design, cookie headers are forbidden request headers, disallowing them to be set in RequestInit.headers in browser environments. Since Undici handles headers more liberally than the specification, so there was a disconnect between the spec's assumptions and Undici's fetch implementation.

As such, this may lead to accidental leakage of cookies to a 3rd-party site or a malicious attacker who can control the redirection target (i.e. an open redirector) to leak the cookie to the 3rd party site.

Patches This was patched in e041de359221ebeae04c469e8aff4145764e6d76, which is included in version 5.26.2.

JennaySDavis commented 5 months ago

#472 Acceptance Criteria

Pass/Fail Description
Pass Smoke Testing of Training app.

Comments/Additional Notes Performance score will increase when https://github.com/orgs/GSA/projects/43/views/1?pane=issue&itemId=46203471 is completed. A Link checker was completed on the app - no broken links.

ADA Compliance (Automated scan via Chrome Lighthouse) Criteria Score
Performance 96*
Accessibility 100
Best Practices 100

*average several scans were completed

Passed 02/2/2024 - JSD

LoraBradford commented 5 months ago

Thank you! Approved with the understanding that #455 will increase score. Moving to done!