Description
crypto-js is a JavaScript library of crypto standards. Prior to version 4.2.0, 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 defaults to SHA1, a cryptographic hash algorithm considered insecure since at least 2005, and 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. If used to protect passwords, the impact is high. If used to generate signatures, the impact is high. Version 4.2.0 contains a patch for this issue. As a workaround, configure crypto-js to use SHA256 with at least 250,000 iterations.
Remediation
References
https://github.com/brix/crypto-js/security/advisories/GHSA-xwcq-pm8m-c4vf
https://github.com/brix/crypto-js/commit/421dd538b2d34e7c24a5b72cc64dc2b9167db40a
https://lists.debian.org/debian-lts-announce/2023/11/msg00025.html
Related Vulnerabilities
CVE-2013-6448 Vulnerability in maven package org.jboss.seam:jboss-seam-remoting
CVE-2020-2187 Vulnerability in maven package org.jenkins-ci.plugins:ec2
CVE-2016-3087 Vulnerability in maven package org.apache.struts:struts2-core
CVE-2020-1947 Vulnerability in maven package org.apache.shardingsphere:shardingsphere