CVE-2025-1796 Weak cryptography in langgenius/dify

High 7.5 Published Updated

Attackers can predict password reset codes due to weak PRNG usage, enabling full account takeover including admin privileges in Dify.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2025-1796?

CVE-2025-1796 is a high-severity vulnerability in langgenius/dify, published on 20 Mar 2025. Any signed-in user can exploit it over the network, with no action from the victim.

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.

Weakness: CWE-338

Which versions are affected by CVE-2025-1796?

It affects 1 product.

Products include Langgenius Dify.

How do I fix CVE-2025-1796?

No fix has been published for CVE-2025-1796 yet. Limit exposure of the affected software until one is available.

Is CVE-2025-1796 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-1796 exists.

Sources

Also known as GHSA-cvg9-334x-w586.

Is CVE-2025-1796 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free