Servers and applications
GHSA-fw4f-cghv-2v33
Use of Cryptographically Weak Pseudo-Random Number Generator for API Key Generation
- Severity
- Medium 6.5
- Published
- 11 Feb 2026
- Last changed
- 11 Feb 2026
- Added to UpHeron
- 3 Nov 2026
- Fixed in
- 1.4.2
- Weakness
- CWE-338
- Attack
- Over the network · Only under certain conditions · No login needed · No user action needed
- Attacker can
- Read data · Change some data
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N- Sources
- Project advisories (GitHub)
Description
The software uses Python's random module for generating API keys. This module relies on a cryptographically weak pseudo-random number generator (Mersenne Twister), which could allow an attacker to predict the generated API keys.
The API key generation process in this software relies on a cryptographically weak Pseudo-Random Number Generator (PRNG), specifically the "Mersenne Twister" algorithm. While Mersenne Twister has good statistical properties, it is deterministic and therefore not suitable for generating security-sensitive values like API keys.
This vulnerability may allow an attacker to predict generated API keys. If an attacker successfully predicts a key, they could impersonate legitimate users, leading to unauthorized access to confidential information, data tampering, or other malicious actions.
Affected software
| Software | Affected versions |
|---|---|
DifyServers and applications · github:langgenius/dify |
|
About Dify
Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
- GitHub stars
- 161,177GitHub, 15 Nov 2026
- Forks
- 25,501GitHub, 15 Nov 2026
- Latest release
- 1.19.0GitHub, 15 Nov 2026
- Released
- 4 Nov 2026GitHub
- First published on GitHub
- 12 Apr 2023GitHub
Vulnerabilities in Dify
- In our list
- 42
- Published in the last 12 months
- 21
- Critical, last 12 months
- 3
- High, last 12 months
- 7
- Known exploited
- 0
- GHSA-6j8g-rp8v-55vrPer-IP Rate Limit Bypass via Spoofable X-Forwarded-For and CF-Connecting-IP HeadersMedium 6.5 14 Nov 2026
- CVE-2026-58141Dify < 1.15.0 SSRF Protection Bypass via Remote-Files EndpointsHigh 7.2 6 Nov 2026
- CVE-2026-123135langgenius dify Sandbox Run __init__.py hard-coded credentialsMedium 5.3 5 Nov 2026
- CVE-2026-105761IDOR in AppMCPServer PUT Endpoint Allows Modification of Other Apps' MCP ServersHigh 7.1 19 Aug 2026
- GHSA-9c9q-5rj5-mjj2Cross-Tenant File Preview via Unscoped Console `file_id`High 7.7 15 Jul 2026
- GHSA-fj5w-7rc8-3f3fCross-Tenant External API Usage EnumerationMedium 4.3 15 Jul 2026
References
- GitHub Advisory Database https://github.com/advisories/GHSA-fw4f-cghv-2v33
- github.com https://github.com/langgenius/dify/security/advisories/GHSA-fw4f-cghv-2v33