langgenius/dify: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
CVE-2025-1796 is a high-severity use of cryptographically weak pseudo-random number generator (PRNG) vulnerability in langgenius/dify from LangGenius, with a CVSS 3.1 base score of 8.8 out of 10. It can be exploited remotely over the network by an attacker with a low-privileged account, without any action from a user. Affected langgenius/dify versions: latest and earlier. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 0.61% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Check which version of langgenius/dify you run against the affected versions below, and install the vendor's latest release.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Langgenius | langgenius/dify | latest and earlier | Not stated |
| Langgenius | Dify | 0.10.1 | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- LowA basic user account is enough.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 8.8 | High | NVD |
| CVSS 3.0 | 7.5 | High | CNA (huntr.dev) |
Official description
A vulnerability in langgenius/dify v0.10.1 allows an attacker to take over any account, including administrator accounts, by exploiting a weak pseudo-random number generator (PRNG) used for generating password reset codes. The application uses `random.randint` for this purpose, which is not suitable for cryptographic use and can be cracked. An attacker with access to workflow tools can extract the PRNG output and predict future password reset codes, leading to a complete compromise of the application.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
The product uses a Pseudo-Random Number Generator (PRNG) in a security context, but the PRNG's algorithm is not cryptographically strong.
How developers prevent this class of flaw
- Use functions or hardware which use a hardware-based random number generation for all crypto. This is the recommended solution. Use CyptGenRandom on Windows, or hw_rand() on Linux.
More Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) vulnerabilities (CWE-338)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: poc, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Technical write-ups (may include proof of concept)
- huntr.com/bounties/a60f3039-5394-4e22-8de7-a7da9c6a6e00Exploit, Third Party Advisory
Other vulnerabilities in langgenius/dify
- 7.2 High severity
- 8.8 High severity
- 8.1 High severity
- 8.1 High severity
- 7.6 High severity
- 7.5 High severity
Recent Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) vulnerabilities
- 8.8 High severity
- 9.8 Critical severity
- 7.5 High severity
- 8.8 High severity
- 9.1 Critical severity
- 7.5 High severity
Spotted an error? Tell us.