crypto: 100,000 iterations of PBKDF2 is insecure
Author: ghostCreated Oct 25, 2023Updated Sep 20, 2026
Labelsfeature requestworkers-runtime
Hello,
workerd (and Cloudflare Workers) limits the number of PBKDF2 iterations to 100,000 to avoid DoS.
We can see the code here: https://github.com/cloudflare/workerd/blob/d1a3c89716591753406923e177b54da3475dd01c/src/workerd/api/crypto-impl-pbkdf2.c%2B%2B#L45C31-L45C37
While I understand the reason, especially in a multi-tenant environment like Cloudflare Workers, 100,000 iterations is far from secure, as per OWASP guidelines, which, in 2023, recommends at least 210,000 iterations for PBKDF2-SHA-512 and 600,000 iterations for PBKDF2-SHA-256, making any application hashing passwords from Cloudflare Workers insecure.
This is why I'm requesting an increase to at least 400,000 iterations.
Source: cloudflare/workerd