CVE-2021-27913: Use of a Broken or Risky Cryptographic Algorithm

Published Aug 30, 2021
·
Updated

✍️ Description The function mtrand 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 mtrand 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 'mtsrand(13333337); echo mtrand( ), "\n";' After that, copy the output (1863134308) and execute the following commands:

root$ gcc phpmtseed.c -o phpmtseedroot$ ./phpmtseed 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

- https://openwall.com/phpmtseedhttps://crypto.di.uoa.gr/CRYPTO.SEC/RandomnessAttacksfiles/paper.pdf - https://github.com/mautic/mautic/blob/5213e320b4ef4d0c51bb84c1d46a1071e8e4f7fc/app/bundles/PointBundle/Controller/TriggerController.php#L187 - https://github.com/mautic/mautic/releases/tag/3.3.4 - https://github.com/mautic/mautic/releases/tag/4.0.0

Other sources

The function mtrand 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.

Use of a Broken or Risky Cryptographic Algorithm

Affected Software

7 affected componentsFixes available
composer/mautic/core<4.0.0, >=3.3.0, <3.3.4, >=3.2.0, <3.3.0, >=3.1.0, <3.2.0, >=3.0.0, <3.1.0
composer/mautic/core>=4.0.0-alpha1<4.0.0
4.0.0
composer/mautic/core<3.3.4
3.3.4
Acquia Mautic<3.3.4
Acquia Mautic=4.0.0-alpha1
Acquia Mautic=4.0.0-beta
Acquia Mautic=4.0.0-rc

Event History

Aug 30, 2021
CVE Published
via MITRE·03:55 PM
Data Sourced
via MITRE·03:55 PM
DescriptionSeverityWeakness
Sep 1, 2021
Advisory Published
via GitHub·06:41 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2021-27913?

CVE-2021-27913 has been rated as a high severity vulnerability due to its potential for session token enumeration.

2

How do I fix CVE-2021-27913?

To fix CVE-2021-27913, update Mautic to version 4.0.0 or 3.3.4 or later.

3

What is the impact of CVE-2021-27913?

CVE-2021-27913 allows attackers to exploit poor pseudorandomness in token generation, leading to unauthorized access.

4

Which software versions are affected by CVE-2021-27913?

CVE-2021-27913 affects Mautic versions between 3.0.0 and 3.3.4, as well as the 4.0.0-alpha1, beta, and rc versions.

5

Is CVE-2021-27913 a critical vulnerability?

CVE-2021-27913 is considered critical due to the ease with which an attacker can exploit the vulnerability to retrieve valid session tokens.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203