Jervis, Weak Randomness for Timing Attack Mitigation (High Severity)

Listen to this Post

The vulnerability in Jervis stems from its use of `java.util.Random()` to generate random delays intended to mitigate timing side-channel attacks within its `SecurityIO` class. This pseudo-random number generator (PRNG) is designed for general purposes, not cryptography, and produces a predictable sequence of numbers based on a deterministically seeded initial state. For timing attack defenses, the unpredictability of the introduced delay is critical. An attacker who can observe system responses or has knowledge of the application’s state could potentially predict or reconstruct the sequence of random delays. By analyzing patterns over multiple requests, the adversary can model the PRNG’s output, effectively subtracting the intended noise from their timing measurements. This allows them to isolate the genuine computational timing differences they need to exploit, thereby nullifying the security control. The core failure is using a non-cryptographic source of randomness for a security-sensitive function where the quality and unpredictability of the random values are paramount to the defense mechanism’s efficacy.

DailyCVE Form

Platform: Jervis CI
Version: Before 2.2
Vulnerability: Insecure Randomness
Severity: High
Date: 2026-01-13

Prediction: 2026-01-13

What Undercode Say:

Scans codebase for insecure Random usage
grep -r "java.util.Random()" .
Example vulnerable code (SecurityIO.groovy)
def vulnerableDelay() {
def rnd = new java.util.Random()
return rnd.nextInt(MAX_DELAY)
}
Patched code using SecureRandom
def secureDelay() {
def rnd = new java.security.SecureRandom()
return rnd.nextInt(MAX_DELAY)
}

How Exploit:

  1. Attacker probes a secure endpoint in Jervis protected by random timing delays.
  2. They collect a large sample of response times across many repeated requests.
  3. Using statistical analysis, they model the predictable output pattern of java.util.Random().
  4. They filter the predicted “noise” from the collected timing data.
  5. The residual, clean timing data reveals sensitive information about operations or data.

Protection from this CVE

  • Immediately upgrade to Jervis version 2.2.
  • Replace all `java.util.Random()` calls for security features with java.security.SecureRandom.
  • Review code for similar patterns in other security mitigations.

Impact

Bypass of timing attack defenses, potentially leading to information disclosure of sensitive process or data details.

🎯Let’s Practice Exploiting & Learn Patching For Free:

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top