{"id":"CVE-2026-58272","aliases":["EUVD-2026-84199","GHSA-29hq-23m2-2j47"],"status":"published","title":"Sync-in Server has Username/Login Enumeration via Timing Side-Channel on POST /api/auth/login (incomplete fix of the prior timing-attack advisory)","description":"Sync-in Server is an open-source platform for file storage, sharing, collaboration, and syncing. Versions prior to 2.4.1 contain an observable timing discrepancy in the login endpoint because authentication attempts for nonexistent accounts return without performing the bcrypt comparison used for existing accounts. An unauthenticated attacker can measure response times to enumerate valid usernames or email addresses, facilitating credential-stuffing, password-spraying, and phishing attacks. Version 2.4.1 contains a patch.","severity":{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00394,"percentile":0.33985,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-208"],"published":"2026-09-21T20:31:46Z","modified":"2026-10-28T02:30:47Z","fixes":[{"ecosystem":"npm","package":"@sync-in/server","fixed_in":["2.4.1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"@sync-in/server","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"2.4.0"},{"fixed":"2.4.1"}]}]},{"source":"osv","ecosystem":"npm","package":"@sync-in/server","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.4.1"}]}]}],"products":[{"vendor":"devolutions","product":"server"},{"vendor":"sync-in","product":"server"}],"references":[{"url":"https://github.com/Sync-in/server/security/advisories/GHSA-29hq-23m2-2j47","tags":["x_refsource_CONFIRM","exploit","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-58272","tags":["advisory"]},{"url":"https://github.com/Sync-in/server/commit/b80efe04574039a7a302c0e1007f03a7dbe6a633","tags":["web"]},{"url":"https://github.com/Sync-in/server/releases/tag/v2.4.1","tags":["web"]},{"url":"https://github.com/advisories/GHSA-29hq-23m2-2j47"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/58xxx/CVE-2026-58272.json","tags":["advisory"]},{"url":"https://github.com/Sync-in/server","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-58272","title":"Sync-in Server has Username/Login Enumeration via Timing Side-Channel on POST /api/auth/login (incomplete fix of the prior timing-attack advisory)","description":"Sync-in Server is an open-source platform for file storage, sharing, collaboration, and syncing. Versions prior to 2.4.1 contain an observable timing discrepancy in the login endpoint because authentication attempts for nonexistent accounts return without performing the bcrypt comparison used for existing accounts. An unauthenticated attacker can measure response times to enumerate valid usernames or email addresses, facilitating credential-stuffing, password-spraying, and phishing attacks. Version 2.4.1 contains a patch.","status":"published","published":"2026-09-21T20:31:46.272Z","modified":"2026-09-23T19:42:05.134Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-208"],"updated_at":"2026-11-02T13:47:39.876248Z"}],"euvd":[{"id":"EUVD-2026-84199","description":"Sync-in Server is an open-source platform for file storage, sharing, collaboration, and syncing. Versions prior to 2.4.1 contain an observable timing discrepancy in the login endpoint because authentication attempts for nonexistent accounts return without performing the bcrypt comparison used for existing accounts. An unauthenticated attacker can measure response times to enumerate valid usernames or email addresses, facilitating credential-stuffing, password-spraying, and phishing attacks. Version 2.4.1 contains a patch.","status":"published","published":"2026-09-21T20:31:46Z","modified":"2026-09-23T19:42:05Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T17:27:59.820483Z"}],"ghsa":[{"id":"GHSA-29hq-23m2-2j47","title":"Sync-in Server has Username/Login Enumeration via Timing Side-Channel on POST /api/auth/login (incomplete fix of the prior timing-attack advisory)","description":"## Summary\n\nvalidateUser() in backend/src/authentication/providers/mysql/auth-provider-mysql.service.ts returns immediately when the supplied login/email does not match any account, without ever calling comparePassword():\n\n    async validateUser(loginOrEmail: string, password: string, ip?: string, scope?: AUTH_SCOPE): Promise\u003cUserModel\u003e {\n      let user: UserModel\n      try {\n        user = await this.usersManager.findUser(loginOrEmail, false)\n      } catch (e) { ... }\n      if (!user) {\n        this.logger.warn(...)\n        return null   // \u003c-- comparePassword() is never reached here\n      }\n      return await this.usersManager.logUser(user, password, ip, scope)\n    }\n\ncomparePassword() (backend/src/common/functions.ts) already contains a dummy-hash branch that was clearly added to defend against exactly this class of attack:\n\n    export async function comparePassword(password: string, hash?: string | null): Promise\u003cboolean\u003e {\n      if (!hash) {\n        // No hash, waste time for time-based attacks\n        await bcrypt.compare(password, DUMMY_PASSWORD_HASH)\n        return false\n      }\n      return await bcrypt.compare(password, hash)\n    }\n\nThe problem is that this protection only runs when comparePassword() is actually invoked with a falsy hash. Because validateUser() short-circuits with return null as soon as findUser() comes back empty, the \"account doesn't exist\" path skips all cryptographic work entirely, while the \"account exists, wrong password\" path always performs a real bcrypt comparison (cost factor 10, ~100ms+). The two outcomes are trivially distinguishable by response time.\n\nThere's already a published advisory in this repo for \"Username Enumeration via Timing Attack\" - this looks like the same underlying issue surfacing through a different call path (the early return in validateUser()) that the existing fix (the dummy-hash branch in comparePassword()) doesn't actually reach, rather than a brand new vulnerability class.\n\n## Impact\n\nAny unauthenticated client can determine whether a given username/email is a valid account on the instance by timing POST /api/auth/login:\n- Non-existent login: near-instant rejection (no bcrypt call).\n- Existing login (regardless of password correctness): consistently slower due to a real bcrypt comparison.\n\nThis enables efficient enumeration of valid accounts, which can then be used to focus credential-stuffing, password-spraying, or phishing against confirmed-valid targets.\n\n## Proof of Concept\n\nVerified with the actual comparePassword() logic and the real DUMMY_PASSWORD_HASH constant copied verbatim from backend/src/common/functions.ts, using the project's own bcryptjs dependency (no mocking of bcrypt itself):\n\n    Avg time for \"login does not exist\" path (validateUser returns null, no bcrypt call): 0.00 ms\n    Avg time for \"login exists, wrong password\" path (real bcrypt.compare runs):          114.90 ms\n    Difference: 114.90 ms (ratio: ~58923x)\n\nThe \"not found\" path reproduces validateUser()'s exact early return (no call into comparePassword); the \"wrong password\" path reproduces logUser()'s real call into comparePassword(password, user.password). The gap is large enough to be trivially observable over a real network, even accounting for jitter.\n\nReachable endpoint: POST /api/auth/login, guarded only by AuthLocalGuard (Passport local strategy invoking validateUser()), no authentication required.\n\n## Suggested fix\n\nMake validateUser() always pass through comparePassword()'s timing-equalized path, even when no user is found, e.g.:\n\n    if (!user) {\n      await comparePassword(password, null) // burns the same time as a real comparison\n      return null\n    }\n\nso the \"account not found\" and \"account found, wrong password\" branches take statistically indistinguishable time.","status":"published","published":"2026-09-22T14:49:23Z","modified":"2026-09-22T14:49:27Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium"}],"cwes":["CWE-208"],"updated_at":"2026-11-02T14:41:19.455935Z"}],"nvd":[{"id":"CVE-2026-58272","description":"Sync-in Server is an open-source platform for file storage, sharing, collaboration, and syncing. Versions prior to 2.4.1 contain an observable timing discrepancy in the login endpoint because authentication attempts for nonexistent accounts return without performing the bcrypt comparison used for existing accounts. An unauthenticated attacker can measure response times to enumerate valid usernames or email addresses, facilitating credential-stuffing, password-spraying, and phishing attacks. Version 2.4.1 contains a patch.","status":"published","published":"2026-09-21T21:17:06.207Z","modified":"2026-09-30T17:32:07.107Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium","assessor":"secondary"}],"cwes":["CWE-208"],"updated_at":"2026-11-02T14:12:50.368368Z"}],"osv":[{"id":"CVE-2026-58272","title":"Sync-in Server has Username/Login Enumeration via Timing Side-Channel on POST /api/auth/login (incomplete fix of the prior timing-attack advisory)","description":"Sync-in Server is an open-source platform for file storage, sharing, collaboration, and syncing. Versions prior to 2.4.1 contain an observable timing discrepancy in the login endpoint because authentication attempts for nonexistent accounts return without performing the bcrypt comparison used for existing accounts. An unauthenticated attacker can measure response times to enumerate valid usernames or email addresses, facilitating credential-stuffing, password-spraying, and phishing attacks. Version 2.4.1 contains a patch.","status":"published","published":"2026-09-21T20:31:46.272Z","modified":"2026-10-28T02:30:47.726189229Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium"}],"cwes":["CWE-208"],"updated_at":"2026-11-02T15:45:12.016252Z"},{"id":"GHSA-29hq-23m2-2j47","title":"Sync-in Server has Username/Login Enumeration via Timing Side-Channel on POST /api/auth/login (incomplete fix of the prior timing-attack advisory)","description":"## Summary\n\nvalidateUser() in backend/src/authentication/providers/mysql/auth-provider-mysql.service.ts returns immediately when the supplied login/email does not match any account, without ever calling comparePassword():\n\n    async validateUser(loginOrEmail: string, password: string, ip?: string, scope?: AUTH_SCOPE): Promise\u003cUserModel\u003e {\n      let user: UserModel\n      try {\n        user = await this.usersManager.findUser(loginOrEmail, false)\n      } catch (e) { ... }\n      if (!user) {\n        this.logger.warn(...)\n        return null   // \u003c-- comparePassword() is never reached here\n      }\n      return await this.usersManager.logUser(user, password, ip, scope)\n    }\n\ncomparePassword() (backend/src/common/functions.ts) already contains a dummy-hash branch that was clearly added to defend against exactly this class of attack:\n\n    export async function comparePassword(password: string, hash?: string | null): Promise\u003cboolean\u003e {\n      if (!hash) {\n        // No hash, waste time for time-based attacks\n        await bcrypt.compare(password, DUMMY_PASSWORD_HASH)\n        return false\n      }\n      return await bcrypt.compare(password, hash)\n    }\n\nThe problem is that this protection only runs when comparePassword() is actually invoked with a falsy hash. Because validateUser() short-circuits with return null as soon as findUser() comes back empty, the \"account doesn't exist\" path skips all cryptographic work entirely, while the \"account exists, wrong password\" path always performs a real bcrypt comparison (cost factor 10, ~100ms+). The two outcomes are trivially distinguishable by response time.\n\nThere's already a published advisory in this repo for \"Username Enumeration via Timing Attack\" - this looks like the same underlying issue surfacing through a different call path (the early return in validateUser()) that the existing fix (the dummy-hash branch in comparePassword()) doesn't actually reach, rather than a brand new vulnerability class.\n\n## Impact\n\nAny unauthenticated client can determine whether a given username/email is a valid account on the instance by timing POST /api/auth/login:\n- Non-existent login: near-instant rejection (no bcrypt call).\n- Existing login (regardless of password correctness): consistently slower due to a real bcrypt comparison.\n\nThis enables efficient enumeration of valid accounts, which can then be used to focus credential-stuffing, password-spraying, or phishing against confirmed-valid targets.\n\n## Proof of Concept\n\nVerified with the actual comparePassword() logic and the real DUMMY_PASSWORD_HASH constant copied verbatim from backend/src/common/functions.ts, using the project's own bcryptjs dependency (no mocking of bcrypt itself):\n\n    Avg time for \"login does not exist\" path (validateUser returns null, no bcrypt call): 0.00 ms\n    Avg time for \"login exists, wrong password\" path (real bcrypt.compare runs):          114.90 ms\n    Difference: 114.90 ms (ratio: ~58923x)\n\nThe \"not found\" path reproduces validateUser()'s exact early return (no call into comparePassword); the \"wrong password\" path reproduces logUser()'s real call into comparePassword(password, user.password). The gap is large enough to be trivially observable over a real network, even accounting for jitter.\n\nReachable endpoint: POST /api/auth/login, guarded only by AuthLocalGuard (Passport local strategy invoking validateUser()), no authentication required.\n\n## Suggested fix\n\nMake validateUser() always pass through comparePassword()'s timing-equalized path, even when no user is found, e.g.:\n\n    if (!user) {\n      await comparePassword(password, null) // burns the same time as a real comparison\n      return null\n    }\n\nso the \"account not found\" and \"account found, wrong password\" branches take statistically indistinguishable time.","status":"published","published":"2026-09-22T14:49:23Z","modified":"2026-09-22T15:00:48.90227626Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium"}],"cwes":["CWE-208"],"updated_at":"2026-11-02T15:46:33.956911Z"}]}}
