GSA / smartpay-training

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

Dependabot Alert: crypto-js PBKDF2 1,000 times weaker than specified in 1993 and 1.3M times weaker than current standard #463

Open JennaySDavis opened 6 months ago

JennaySDavis commented 6 months ago

Impact Summary Crypto-js PBKDF2 is 1,000 times weaker than originally specified in 1993, and at least 1,300,000 times weaker than current industry standard. This is because it both (1) defaults to SHA1, a cryptographic hash algorithm considered insecure since at least 2005 and (2) defaults to one single iteration, a 'strength' or 'difficulty' value specified at 1,000 when specified in 1993. PBKDF2 relies on iteration count as a countermeasure to preimage and collision attacks.

Potential Impact:

If used to protect passwords, the impact is high. If used to generate signatures, the impact is high. Probability / risk analysis / attack enumeration:

For at most $45,000, an attacker, given control of only the beginning of a crypto-js PBKDF2 input, can create a value which has identical cryptographic signature to any chosen known value. Due to the length extension attack on SHA1, we can create a value that has identical signature to any unknown value, provided it is prefixed by a known value. It does not matter if PBKDF2 applies 'salt' or 'pepper' or any other secret unknown to the attacker. It will still create an identical signature. crypto-js has 10,642 public users as displayed on NPM, today October 11th 2023. The number of transient dependents is likely several orders of magnitude higher.

A very rough GitHub search shows 432 files cross GitHub using PBKDF2 in crypto-js in Typescript or JavaScript, but not specifying any number of iterations.

Affected versions All versions are impacted. This code has been the same since crypto-js was first created.

JennaySDavis commented 5 months ago

#463 Acceptance Criteria

Pass/Fail Description
Pass Login and complete a training
Pass Login as Admin User

Comments/Additional Notes N/A

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

Passed 01/26/2024 - JSD

LoraBradford commented 5 months ago

Reviewed training website, did not see any issues. Thank you! Moving to Done!