CWEweakness

CWE-760 Use of a One-Way Hash with a Predictable Salt

Official page ↗
Abstraction
Variant
Structure
Simple
Status
Incomplete
Languages
Not Language-Specific
CWE version
5.0

Description

The product uses a one-way cryptographic hash against an input that should not be reversible, such as a password, but the product uses a predictable salt as part of the input.

Common consequences

• Access Control: Bypass Protection Mechanism — This makes it easier for attackers to pre-compute the hash value using dictionary attack techniques such as rainbow tables, effectively disabling the protection that an unpredictable salt would provide.

Potential mitigations

• [Architecture and Design] Use an adaptive hash function that can be configured to change the amount of computational effort needed to compute the hash, such as the number of iterations ("stretching") or the amount of memory required. Some hash functions perform salting automatically. These functions can significantly increase the overhead for a brute force attack compared to intentionally-fast functions such as MD5. For example, rainbow table attacks can become infeasible due to the high computing overhead. Finally, since computing power gets faster and cheaper over time, the technique can be reconfigured to increase the workload without forcing an entire replacement of the algorithm in use. Some hash functions that have one or more of these desired properties include bcrypt [REF-291], scrypt [REF-292], and PBKDF2 [REF-293]. While there is active debate about which of these is the most effective, they are all stronger than using salts with hash functions with very little computing overhead. Note that using these functions can have an impact on performance, so they require special consideration to avoid denial-of-service attacks. However, their configurability provides finer control over how much CPU and memory is used, so it could be adjusted to suit the environment's needs. • [Implementation] If a technique that requires extra computational effort can not be implemented, then for each password that is processed, generate a new random salt using a strong random number generator with unpredictable seeds. Add the salt to the plaintext password before hashing it. When storing the hash, also store the salt. Do not use the same salt for every password.

Detection methods

• Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

Observed examples

• CVE-2008-4905: Blogging software uses a hard-coded salt when calculating a password hash. • CVE-2002-1657: Database server uses the username for a salt when encrypting passwords, simplifying brute force attacks. • CVE-2001-0967: Server uses a constant salt when encrypting passwords, simplifying brute force attacks. • CVE-2005-0408: Chain: product generates predictable MD5 hashes using a constant value combined with username, allowing authentication bypass.

Related

Observed example · CVE (4)

  • CVE-2008-4905 Typo 5.1.3 and earlier uses a hard-coded salt for calculating password hashes, which makes it easier for attackers to guess passwords via a… vulnerability
  • CVE-2005-0408 CitrusDB 0.3.6 and earlier generates easily predictable MD5 hashes of the user name for the id_hash cookie, which allows remote attackers… vulnerability
  • CVE-2002-1657 PostgreSQL uses the username for a salt when generating passwords, which makes it easier for remote attackers to guess passwords via a… vulnerability
  • CVE-2001-0967 Knox Arkeia server 4.2, and possibly other versions, uses a constant salt when encrypting passwords using the crypt() function, which makes… vulnerability

Child of · CWE (1)

  • CWE-916 Use of Password Hash With Insufficient Computational Effort weakness

Referenced by CVE · weakness (11)

  • CVE-2026-82759 Use of a One-Way Hash with a Predictable Salt vulnerability in team-alembic AshAuthentication allows readers of the audit store to recover… vulnerability
  • CVE-2026-46749 A vulnerability has been identified in SINEC INS (All versions < V1.0 SP2 Update 6). vulnerability
  • CVE-2026-9370 A weakness has been identified in ulisesbocchio jasypt-spring-boot up to 3.0.5/4.0.4. vulnerability
  • CVE-2025-9290 An authentication weakness was identified in Omada Controllers, Gateways and Access Points, controller-device adoption due to improper… vulnerability
  • CVE-2024-13951 One way hash with predictable salt vulnerabilities in ASPECT may expose sensitive information to a potential attackerThis issue affects… vulnerability
  • CVE-2025-26486 Broken or Risky Cryptographic Algorithm, Use of Password Hash With Insufficient Computational Effort, Use of Weak Hash, Use of a One-Way… vulnerability
  • CVE-2024-38881 An issue in Horizon Business Services Inc. vulnerability
  • CVE-2023-22599 InHand Networks InRouter 302, prior to version IR302 V3.5.56, and InRouter 615, prior to version InRouter6XX-S-V2.3.0.r5542, contain… vulnerability
  • CVE-2021-38314 The Gutenberg Template Library & Redux Framework plugin <= 4.2.11 for WordPress registered several AJAX actions available to… vulnerability
  • CVE-2020-28214 A CWE-760: Use of a One-Way Hash with a Predictable Salt vulnerability exists in Modicon M221 (all references, all versions), that could… vulnerability
  • CVE-2018-5552 Versions of DocuTrac QuicDoc and Office Therapy that ship with DTISQLInstaller.exe version 1.6.4.0 and prior contains a hard-coded… vulnerability

Referenced by OWASP · mapped cwe (2)

  • A04:2025 Cryptographic Failures Top 10 2025
  • A02:2021 Cryptographic Failures Top 10 2021