Miggo Logo

CVE-2025-62710: Sakai kernel-impl: predictable PRNG used to generate server‑side encryption key in EncryptionUtilityServiceImpl

2.6

CVSS Score
3.1

Basic Information

EPSS Score
0.02534%
Published
10/22/2025
Updated
10/23/2025
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.sakaiproject.kernel:sakai-kernel-implmaven<= 23.3

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The security advisory GHSA-gr7h-xw4f-wh86 describes a vulnerability where a predictable pseudo-random number generator (PRNG) is used for generating a critical server-side encryption key. The analysis of the provided patch commit, bde070104b1de01f4a6458dca6d9e0880a0e3c04, confirms this.

The root cause is the use of org.apache.commons.lang3.RandomStringUtils without providing a cryptographically secure random number generator. By default, this utility uses java.util.Random, which is not suitable for security-sensitive applications as its output can be predicted if an attacker has some knowledge of the seed (e.g., the application's start time).

The investigation of the patch revealed two key locations where this insecure method was used:

  1. org.sakaiproject.util.impl.EncryptionUtilityServiceImpl.init(): This is the primary vulnerable function identified in the advisory. It generates the serverSecretKey used for encryption services across the application. The patch replaces the insecure call with one that explicitly uses java.security.SecureRandom, a cryptographically strong PRNG.

  2. org.sakaiproject.component.app.scheduler.jobs.cm.processor.sis.UserProcessor.generatePassword(): A similar insecure pattern was found and fixed in this method, which is responsible for generating user passwords. The use of a predictable PRNG here would result in weak, guessable passwords.

Both functions would appear in a runtime profile during the exploitation or triggering of this vulnerability. The init function would be called during application startup, and generatePassword would be called during user processing tasks. An attacker could target the output of either function (encrypted data or user passwords) to exploit this weakness.

Vulnerable functions

org.sakaiproject.util.impl.EncryptionUtilityServiceImpl.init
kernel/kernel-impl/src/main/java/org/sakaiproject/util/impl/EncryptionUtilityServiceImpl.java
The 'init' method in EncryptionUtilityServiceImpl uses RandomStringUtils with the default java.util.Random to generate a server-wide secret key. This non-cryptographic PRNG is predictable, allowing an attacker who can obtain ciphertexts and approximate the PRNG seed to reconstruct the key and decrypt data.
org.sakaiproject.component.app.scheduler.jobs.cm.processor.sis.UserProcessor.generatePassword
jobscheduler/scheduler-component-shared/src/java/org/sakaiproject/component/app/scheduler/jobs/cm/processor/sis/UserProcessor.java
The 'generatePassword' method in UserProcessor uses RandomStringUtils.randomAlphanumeric, which relies on the insecure java.util.Random by default. This creates predictable passwords for users, which could be guessed by an attacker with knowledge of the system's state.

WAF Protection Rules

WAF Rule

### Imp**t *n*ryptionUtilityS*rvi**Impl initi*liz** *n **S***T*xt*n*ryptor p*sswor* (s*rv*rS**r*tK*y) usin* R*n*omStrin*Utils wit* t** ****ult j*v*.util.R*n*om. j*v*.util.R*n*om is * non‑*rypto*r*p*i* PRN* *n* **n ** pr**i*t** *rom limit** st*t*/s***

Reasoning

T** s**urity **visory **S*-*r**-xw**-w*** **s*ri**s * vuln*r**ility w**r* * pr**i*t**l* ps*u*o-r*n*om num**r **n*r*tor (PRN*) is us** *or **n*r*tin* * *riti**l s*rv*r-si** *n*ryption k*y. T** *n*lysis o* t** provi*** p*t** *ommit, *******************