CVE-2021-27913
JSON

3.5low

Use of a Broken or Risky Cryptographic Algorithm

Severity
3.5low CVSS:3.1 by Mautic
Exploit likelihood
0.46% (higher than 41% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Mautic
Also known as
GHSA-x7g2-wrrp-r6h3

Description

The function mt_rand is used to generate session tokens, this function is cryptographically flawed due to its nature being one pseudorandomness, an attacker can take advantage of the cryptographically insecure nature of this function to enumerate session tokens for accounts that are not under his/her control This issue affects: Mautic Mautic versions prior to 3.3.4; versions prior to 4.0.0.

Affected

Product or packageVersionsReported by
Mautic Mauticfrom unspecified before 3.3.4, from unspecified before 4.0.0CVE List
mautic/core (Packagist)before 3.3.4, from 4.0.0-alpha1 before 4.0.0GitHub Advisory Database
acquia mauticbefore 3.3.4, 4.0.0NVD

All scores

Mautic3.5low CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L
GitHub3.5low CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L
NVD3.5low CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:N/A:N
NVD3.5low CVSS:2.0AV:N/AC:M/Au:S/C:P/I:N/A:N

Classification

What each source says

CVE List

The function mt_rand is used to generate session tokens, this function is cryptographically flawed due to its nature being one pseudorandomness, an attacker can take advantage of the cryptographically insecure nature of this function to enumerate session tokens for accounts that are not under his/her control This issue affects: Mautic Mautic versions prior to 3.3.4; versions prior to 4.0.0.

GitHub Advisory Database

✍️ Description

The function mt_rand is used to generate session tokens, this function is cryptographically flawed due to its nature being one pseudorandomness, an attacker can take advantage of the cryptographically insecure nature of this function to enumerate session tokens for accounts that are not under his/her control

🕵️‍♂️ Proof of Concept

Numerous examples and attack implementations can be found in this paper . If you're looking for a practical tool that can crack your mt_rand implementation's seed value, see this project and run the following commands in a console with php5 and OpenWall's tool installed:

root$ php -r 'mt_srand(13333337); echo mt_rand( ), "\n";' After that, copy the output (1863134308) and execute the following commands:

root$ gcc php_mt_seed.c -o php_mt_seedroot$ ./php_mt_seed 1863134308 After waiting ~1 minute you should have a few possible seeds corresponding to their PHP versions, next to your installed PHP version you should see something akin to:

seed = 0x00cb7359 = 13333337 (PHP 7.1.0+) Hey, that's your seed!

💥 Impact

An attacker could takeover accounts at random by enumerating and using access tokens.

📝 References

NVD (es)

La función mt_rand es usada para generar tokens de sesión, esta función es criptográficamente defectuosa debido a que su naturaleza es una pseudoaleatoriedad, un atacante puede aprovechar la naturaleza criptográficamente no segura de esta función para enumerar tokens de sesión para cuentas que no están bajo su control. Este problema afecta a: Mautic versiones anteriores a 3.3.4; versiones anteriores a 4.0.0.

References

Sources

SourceRecordLicence
CVE ListCVE-2021-27913 changed 2024-09-16CVE Terms of Use
GitHub Advisory DatabaseGHSA-x7g2-wrrp-r6h3 changed 2026-07-08CC-BY-4.0
NVDCVE-2021-27913 changed 2026-06-17Public domain