Skip to content
Crypto Disclosed report Intermediate CVE-2021-22948

Use of a Broken or Risky Cryptographic Algorithm

The session-token generation code in revive-adserver relies on a PHP function that does not produce cryptographically secure values. An attacker could theoretically predict or generate other users' session tokens and take over accounts.

418sec Follow

Originally disclosed on HackerOne

  • Triaged in 16 hours
  • Fixed in 7 days
  • Disclosed after 30 days

revive-adserver utilizes a PRNG for session-token generation, this means that an attacker could theoretically be able to generate session tokens at random and take over accounts at random.

This function does not generate cryptographically secure values, and should not be used for cryptographic purposes.

Location: https://github.com/revive-adserver/revive-adserver/blob/6e665eac9b20ff21c167eae420b73a976f3bb52a/www/admin/lib-sessions.inc.php#L228

References: https://www.php.net/manual/en/function.uniqid.php

Impact

This vulnerability is capable of allowing mass account takeover by having attackers generate other users' session tokens.

The original report as published on HackerOne, by 418sec. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the session token is built with PHP's uniqid(), which is not a cryptographically secure random source and produces predictable values.

Impact

The report claims this could allow mass account takeover by letting attackers generate other users' session tokens, though it presents this as theoretical.

What the attacker needed

Ability to predict or brute-force tokens

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When you log in, the server gives your browser a session token, a long random-looking string that proves who you are on later requests. If that string is made with a weak random generator, someone else may be able to guess it and pretend to be you, so the report says accounts could be taken over.

What is Crypto?

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.

More from Revive Adserver

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cryptographic weaknesses

The lesson behind this report.

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.