Skip to content

Passwords hashed with a weak or fast algorithm

Gaphigh severity · reads .ts .tsx .js .jsx .mjs .cjs .pyBeta

MD5 and SHA-1 are fast, so leaked hashes can be cracked quickly. When Lintsure finds this, it marks it as a Gap: the code itself shows the problem.

What it looks like

A line Lintsure flags in its own test app:

// src/more.ts
const hash = md5(user.password);

How to fix it

Use a password hashing function made for it: argon2id, scrypt or bcrypt.

Through a coding agent, Lintsure suggests the change and waits. Nothing is edited until you approve it.

Controls it relates to

  • GDPRArt. 32Security of processing
  • SOC 2CC6.1Logical access security
  • ISO 27001A.8.24Use of cryptography

What the framework asks

GDPR Art. 32: Security of processing

Protect personal data with security that fits the risk: encryption, access control, testing and the ability to recover.

Evidence a reviewer may ask for: Security measures and when they were last tested.

SOC 2 CC6.1: Logical access

Only the right people and systems can reach data. Secrets are protected, passwords are stored safely.

Evidence a reviewer may ask for: Access settings, secret storage and password hashing.

ISO 27001 A.8.24: Use of cryptography

Use strong cryptography correctly and manage keys safely, not in source code.

Evidence a reviewer may ask for: Crypto and key management rules.

Summaries are our own reading of the public texts, not the official wording.

Read more: Which SOC 2 controls you can check in code

Check your code for this

Runs on your machine. Your code is never uploaded.

npx lintsure scan

Quickstart · Use it in Claude Code or Cursor

This rule is in Beta: its mapping to framework controls is waiting for review by a qualified compliance professional. Lintsure is a readiness tool, not an audit or legal advice. A finding, or the lack of one, doesn't make you compliant. Disclaimer

Related rules