CVE-2026-77582
Tinyauth: User enumeration attack by timing oracle
Tinyauth is an authentication and authorization server. Prior to 5.1.0, Tinyauth exposes a remotely observable timing difference between authentication attempts for existing and nonexistent local usernames. internal/controller/user_controller.go loginHandler and internal/middleware/context_middleware.go basicAuth return quickly after internal/service/auth_service.go reports a missing user, while an existing user causes bcrypt password verification work. Repeated measurements can therefore disclose valid usernames and support targeted credential attacks. This issue is fixed in version 5.1.0.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
6.9
Tinyauth: User enumeration attack by timing oracle
Tinyauth is an authentication and authorization server. Prior to 5.1.0, Tinyauth exposes a remotely observable timing difference between authentication attempts for existing and nonexistent local usernames. internal/controller/user_controller.go loginHandler and internal/middleware/context_middleware.go basicAuth return quickly after internal/service/auth_service.go reports a missing user, while an existing user causes bcrypt password verification work. Repeated measurements can therefore disclose valid usernames and support targeted credential attacks. This issue is fixed in version 5.1.0.
- Record
CVE-2026-77582- CVSS 4.0
- 6.9 Medium
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 - Weakness
- CWE-208
- Updated
- 2026-11-02
EUVDEUVD-2026-84014
6.9
Tinyauth is an authentication and authorization server. Prior to 5.1.0, Tinyauth exposes a remotely observable timing difference between authentication attempts for existing and nonexistent local usernames. internal/controller/user_controller.go loginHandler and internal/middleware/context_middleware.go basicAuth return quickly after internal/service/auth_service.go reports a missing user, while an existing user causes bcrypt password verification work. Repeated measurements can therefore disclose valid usernames and support targeted credential attacks. This issue is fixed in version 5.1.0.
- Record
EUVD-2026-84014- CVSS 4.0
- 6.9 Medium
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 - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-456h-ww26-f758
6.9
Tinyauth: User enumeration attack by timing oracle
Summary
It's possible to enumerate users through a timing oracle. In other words: I can easily check if a username exists or not by observing the timing differences between logins.
PoC
Setup a tinyauth server with a local user. It can be over the network.
Try to log in with the local user, using an incorrect password: there is a noticeable delay. You know that the user exists.
Now try to log in with a username that does not exist, using an incorrect password: it will complete almost immediately. You know that the user does not exist.
Expected vs actual behavior
Login attempts should take roughly the same amount of time when the user exists vs when the user does not exist. Right now, nonexistent user attempts are way faster, meaning if your login attempt is slow, then the username exists for sure.
Details
Existing usernames will take an extra ~50 milliseconds to respond to login attempts, while non-existing usernames will take only ~50 microseconds (1000x less time) to return an incorrect password response.
Even taking network traffic into consideration, it is trivial to check whether a local user exists or not.
=== Existing user, wrong password === #1: 50.52ms #2: 46.24ms #3: 43.57ms
=== Nonexistent user === #1: 43.03µs #2: 48.45µs #3: 59.33µs
Suggested fix
This can be solved by checking a dummy password hash when a user is not found before returning a query, this will mimic the exact same delay irrelevant of hardware capabilities.
Potential patch:
From ca102773e0303f6025480efb26db379e3570a350 Mon Sep 17 00:00:00 2001
From: Disyer <[email protected]>
Date: Tue, 14 Jul 2026 12:35:07 +0300
Subject: [PATCH] fix: prevent user enumeration by means of timing attack
---
internal/controller/user_controller.go | 1 +
internal/middleware/context_middleware.go | 1 +
internal/service/auth_service.go | 10 ++++++++++
3 files changed, 12 insertions(+)
diff --git a/internal/controller/user_controller.go b/internal/controller/user_controller.go
index ae6c23b..2ecc996 100644
--- a/internal/controller/user_controller.go
+++ b/internal/controller/user_controller.go
@@ -90,6 +90,7 @@ func (controller *UserController) loginHandler(c *gin.Context) {
if err != nil {
if errors.Is(err, service.ErrUserNotFound) {
+ controller.auth.DummyCheckPassword(req.Password)
controller.log.App.Warn().Str("username", req.Username).Msg("User not found during login attempt")
controller.auth.RecordLoginAttempt(req.Username, false)
controller.log.AuditLoginFailure(req.Username, "unknown", c.ClientIP(), "user not found")
diff --git a/internal/middleware/context_middleware.go b/internal/middleware/context_middleware.go
index f49c85a..f70c9e7 100644
--- a/internal/middleware/context_middleware.go
+++ b/internal/middleware/context_middleware.go
@@ -244,6 +244,7 @@ func (m *ContextMiddleware) basicAuth(username string, password string) (*model.
search, err := m.auth.SearchUser(username)
if err != nil {
+ m.auth.DummyCheckPassword(password)
return nil, nil, fmt.Errorf("error searching for user: %w", err)
}
diff --git a/internal/service/auth_service.go b/internal/service/auth_service.go
index eeb5c8e..9cbc105 100644
--- a/internal/service/auth_service.go
+++ b/internal/service/auth_service.go
@@ -28,6 +28,10 @@ import (
const MaxOAuthPendingSessions = 256
const OAuthCleanupCount = 16
+// a dummy hash to check when a user is not found, to prevent user enumeration
+// hardcoded to prevent having to generate a hash on every startup
+const dummyHash = "$2a$10$iFQ6./j2a.UShYQOzWh4vOlnoze5DmHI3tRY3WU4YMj3zwp.t3TnO"
+
var (
ErrUserNotFound = errors.New("user not found")
)
@@ -204,6 +208,12 @@ func (auth *AuthService) CheckUserPassword(search model.UserSearch, password str
return errors.New("user authentication failed")…
- Record
GHSA-456h-ww26-f758- CVSS 4.0
- 6.9 Medium
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 - Weakness
- CWE-208
- Updated
- 2026-11-02
NVD
6.9
Tinyauth is an authentication and authorization server. Prior to 5.1.0, Tinyauth exposes a remotely observable timing difference between authentication attempts for existing and nonexistent local usernames. internal/controller/user_controller.go loginHandler and internal/middleware/context_middleware.go basicAuth return quickly after internal/service/auth_service.go reports a missing user, while an existing user causes bcrypt password verification work. Repeated measurements can therefore disclose valid usernames and support targeted credential attacks. This issue is fixed in version 5.1.0.
- Record
CVE-2026-77582- CVSS 4.0
- 6.9 Medium
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Weakness
- CWE-208
- Updated
- 2026-11-02
OSV
6.9
Tinyauth: User enumeration attack by timing oracle
Tinyauth is an authentication and authorization server. Prior to 5.1.0, Tinyauth exposes a remotely observable timing difference between authentication attempts for existing and nonexistent local usernames. internal/controller/user_controller.go loginHandler and internal/middleware/context_middleware.go basicAuth return quickly after internal/service/auth_service.go reports a missing user, while an existing user causes bcrypt password verification work. Repeated measurements can therefore disclose valid usernames and support targeted credential attacks. This issue is fixed in version 5.1.0.
- Record
CVE-2026-77582- CVSS 4.0
- 6.9 Medium
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 - Weakness
- CWE-208
- Updated
- 2026-11-02
OSVGHSA-456h-ww26-f758
6.9
Tinyauth: User enumeration attack by timing oracle
Summary
It's possible to enumerate users through a timing oracle. In other words: I can easily check if a username exists or not by observing the timing differences between logins.
PoC
Setup a tinyauth server with a local user. It can be over the network.
Try to log in with the local user, using an incorrect password: there is a noticeable delay. You know that the user exists.
Now try to log in with a username that does not exist, using an incorrect password: it will complete almost immediately. You know that the user does not exist.
Expected vs actual behavior
Login attempts should take roughly the same amount of time when the user exists vs when the user does not exist. Right now, nonexistent user attempts are way faster, meaning if your login attempt is slow, then the username exists for sure.
Details
Existing usernames will take an extra ~50 milliseconds to respond to login attempts, while non-existing usernames will take only ~50 microseconds (1000x less time) to return an incorrect password response.
Even taking network traffic into consideration, it is trivial to check whether a local user exists or not.
=== Existing user, wrong password === #1: 50.52ms #2: 46.24ms #3: 43.57ms
=== Nonexistent user === #1: 43.03µs #2: 48.45µs #3: 59.33µs
Suggested fix
This can be solved by checking a dummy password hash when a user is not found before returning a query, this will mimic the exact same delay irrelevant of hardware capabilities.
Potential patch:
From ca102773e0303f6025480efb26db379e3570a350 Mon Sep 17 00:00:00 2001
From: Disyer <[email protected]>
Date: Tue, 14 Jul 2026 12:35:07 +0300
Subject: [PATCH] fix: prevent user enumeration by means of timing attack
---
internal/controller/user_controller.go | 1 +
internal/middleware/context_middleware.go | 1 +
internal/service/auth_service.go | 10 ++++++++++
3 files changed, 12 insertions(+)
diff --git a/internal/controller/user_controller.go b/internal/controller/user_controller.go
index ae6c23b..2ecc996 100644
--- a/internal/controller/user_controller.go
+++ b/internal/controller/user_controller.go
@@ -90,6 +90,7 @@ func (controller *UserController) loginHandler(c *gin.Context) {
if err != nil {
if errors.Is(err, service.ErrUserNotFound) {
+ controller.auth.DummyCheckPassword(req.Password)
controller.log.App.Warn().Str("username", req.Username).Msg("User not found during login attempt")
controller.auth.RecordLoginAttempt(req.Username, false)
controller.log.AuditLoginFailure(req.Username, "unknown", c.ClientIP(), "user not found")
diff --git a/internal/middleware/context_middleware.go b/internal/middleware/context_middleware.go
index f49c85a..f70c9e7 100644
--- a/internal/middleware/context_middleware.go
+++ b/internal/middleware/context_middleware.go
@@ -244,6 +244,7 @@ func (m *ContextMiddleware) basicAuth(username string, password string) (*model.
search, err := m.auth.SearchUser(username)
if err != nil {
+ m.auth.DummyCheckPassword(password)
return nil, nil, fmt.Errorf("error searching for user: %w", err)
}
diff --git a/internal/service/auth_service.go b/internal/service/auth_service.go
index eeb5c8e..9cbc105 100644
--- a/internal/service/auth_service.go
+++ b/internal/service/auth_service.go
@@ -28,6 +28,10 @@ import (
const MaxOAuthPendingSessions = 256
const OAuthCleanupCount = 16
+// a dummy hash to check when a user is not found, to prevent user enumeration
+// hardcoded to prevent having to generate a hash on every startup
+const dummyHash = "$2a$10$iFQ6./j2a.UShYQOzWh4vOlnoze5DmHI3tRY3WU4YMj3zwp.t3TnO"
+
var (
ErrUserNotFound = errors.New("user not found")
)
@@ -204,6 +208,12 @@ func (auth *AuthService) CheckUserPassword(search model.UserSearch, password str
return errors.New("user authentication failed")…
- Record
GHSA-456h-ww26-f758- CVSS 4.0
- 6.9 Medium
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 - Weakness
- CWE-208
- Updated
- 2026-11-02
OSVGO-2026-6555 No score
Tinyauth: User enumeration attack by timing oracle in github.com/tinyauthapp/tinyauth
Tinyauth: User enumeration attack by timing oracle in github.com/tinyauthapp/tinyauth
- Record
GO-2026-6555- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
github.com/tinyauthapp/tinyauthGo |
before 1.0.1-0.20260714134959-c22925c2fba9 | 1.0.1-0.20260714134959-c22925c2fba9 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-77582 is a medium vulnerability (CVSS 6.9) in Steveiliop56 Tinyauth, published September 21, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.63%, the 50th percentile. Fixed in github.com/tinyauthapp/tinyauth 1.0.1-0.20260714134959-c22925c2fba9.
References
github.com/tinyauthapp/tinyauth/security/advisories/GHSA-456h-ww26-f758
github.com/tinyauthapp/tinyauth/pull/1004
github.com/tinyauthapp/tinyauth/commit/c22925c2fba981875d0a2b09dd3ee41c0ae4c310
github.com/tinyauthapp/tinyauth/releases/tag/v5.1.0
nvd.nist.gov/vuln/detail/CVE-2026-77582
github.com/advisories/GHSA-456h-ww26-f758
github.com/CVEProject/cvelistV5/tree/main/cves/2026/77xxx/CVE-2026-77582.json
github.com/tinyauthapp/tinyauth
Left out here: the rest of 2 source descriptions. The JSON record has them.