Vulnerabilities in pkg:npm/@sync-in/server

PACKAGE
Advisory Identifier: GHSA-29hq-23m2-2j47
Advisory Summary

CVE-2026-58272 is a MODERATE (CVSS 5.3) sync-in server has username/login enumeration vulnerability (CWE-208: Observable Timing Discrepancy) affecting @sync in/server libraries in the npm ecosystem. The issue involves sync-in server has username/login enumeration via timing side-channel on post /api/auth/login (incomplete fix of the prior timing-attack advisory). Remediation is available by upgrading affected packages to version 2.4.1.

7 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@sync-in/server

7 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@sync-in/server. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-29hq-23m2-2j47 CVE-2026-58272 MODERATE Sync-in Server has Username/Login Enumeration via Timing Side-Channel on POST /api/auth/login (incomplete fix of the prior timing-attack advisory)
GHSA-jx63-h26r-8cph CVE-2026-58270 MODERATE Sync-in Server has a ReDoS via Unsanitized Regex in Sync Diff `pathFilters`
GHSA-92cr-jxw4-5wjg CVE-2026-58269 HIGH Sync-in Server has a complete 2FA Bypass via `POST /api/auth/token`
GHSA-274f-6w77-8qm9 CVE-2026-58271 MODERATE @sync-in/server vulnerable to TOTP Brute-Force via `POST /api/app/sync/register`
GHSA-q4x5-8cj6-52wg CVE-2026-47684 HIGH Sync-in Server: SSRF protection bypass via IPv4-mapped IPv6 addresses in regExpPrivateIP
GHSA-43fj-qp3h-hrh5 CVE-2026-41161 MODERATE Sync-in Server has Username Enumeration via Timing Attack
GHSA-9jmq-xgjm-p8c2 CVE-2025-67438 MODERATE Sync-in Server has a stored cross-site scripting (XSS) vulnerability

CVE-2026-58272 at a Glance

CVE Identifier CVE-2026-58272
GHSA Identifier GHSA-29hq-23m2-2j47
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-208: Observable Timing Discrepancy
Affected Product @sync in/server
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-58272

To remediate this vulnerability, upgrade all affected @sync in/server dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@sync-in/server fixed: 2.4.1
npm install @sync-in/server@2.4.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @sync-in/server

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-58272, inspect your project dependencies using npm:

npm ls @sync-in/server

Analyze the terminal output to locate any version of @sync in/server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.4.1), your application is affected.

Note: The npm ls @sync-in/server command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-208: Observable Timing Discrepancy, where two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not. In @sync in/server, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary validateUser() 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(): async validateUser(loginOrEmail: string, password: string, ip?: string, scope?: AUTH_SCOPE): Promise<UserModel> { let user: UserModel try { user = await this.usersManager.findUser(loginOrEmail, false) } catch (e) { ... } if (!user) { this.logger.warn(...) return null // <-- comparePassword() is never reached here } return await this.usersManager.logUser(user, password, ip, scope) } comparePassword() (backend/src/common/functions.ts) already contains a dummy-hash branch that was clearly added to defend against exactly this class of attack: export async function comparePassword(password: string, hash?: string | null): Promise<boolean> { if (!hash) { // No hash, waste time for time-based attacks await bcrypt.compare(password, DUMMY_PASSWORD_HASH) return false } return await bcrypt.compare(password, hash) } The 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. There'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. ## Impact Any unauthenticated client can determine whether a given username/email is a valid account on the instance by timing POST /api/auth/login: - Non-existent login: near-instant rejection (no bcrypt call). - Existing login (regardless of password correctness): consistently slower due to a real bcrypt comparison. This enables efficient enumeration of valid accounts, which can then be used to focus credential-stuffing, password-spraying, or phishing against confirmed-valid targets. ## Proof of Concept Verified 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): Avg time for "login does not exist" path (validateUser returns null, no bcrypt call): 0.00 ms Avg time for "login exists, wrong password" path (real bcrypt.compare runs): 114.90 ms Difference: 114.90 ms (ratio: ~58923x) The "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. Reachable endpoint: POST /api/auth/login, guarded only by AuthLocalGuard (Passport local strategy invoking validateUser()), no authentication required. ## Suggested fix Make validateUser() always pass through comparePassword()'s timing-equalized path, even when no user is found, e.g.: if (!user) { await comparePassword(password, null) // burns the same time as a real comparison return null } so the "account not found" and "account found, wrong password" branches take statistically indistinguishable time.

CVE-2026-58272 Affected @sync in/server Versions

1 component(s)
Fixed Versions:
2.4.1
Product / Package Ecosystem Affected Versions Fixed Version
@sync-in/server
npm
< 2.4.1
2.4.1

References

Frequently Asked Questions

What is CVE-2026-58272?
CVE-2026-58272 is a security vulnerability in @sync in/server involving Sync-in Server has Username/Login Enumeration via Timing Side-Channel on POST /api/auth/login (incomplete fix of the prior timing-attack advisory) under CWE-208: Observable Timing Discrepancy.
Which @sync in/server versions are affected?
Affected versions include releases prior to 2.4.1 across affected packages: @sync-in/server.
What version fixes CVE-2026-58272?
Upgrading to 2.4.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @sync-in/server affected?
Yes, @sync-in/server is affected in releases prior to 2.4.1. Upgrade your dependency to 2.4.1 or later.
What is the CVSS score of CVE-2026-58272?
CVE-2026-58272 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2026-58272?
CVE-2026-58272 is classified under CWE-208: Observable Timing Discrepancy (Two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not.).
How can I check npm dependencies for CVE-2026-58272?
Run the dependency tree command: 'npm ls @sync-in/server'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-29hq-23m2-2j47",
  "modified" : "2026-09-22T14:49:23Z",
  "published" : "2026-09-22T14:49:23Z",
  "aliases" : [ "CVE-2026-58272" ],
  "summary" : "Sync-in Server has Username/Login Enumeration via Timing Side-Channel on POST /api/auth/login (incomplete fix of the prior timing-attack advisory)",
  "details" : "## 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<UserModel> {\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   // <-- 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<boolean> {\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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@sync-in/server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.4.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.4.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Sync-in/server/security/advisories/GHSA-29hq-23m2-2j47"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-58272"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Sync-in/server/commit/b80efe04574039a7a302c0e1007f03a7dbe6a633"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Sync-in/server"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Sync-in/server/releases/tag/v2.4.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-208" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-22T14:49:23Z",
    "nvd_published_at" : "2026-09-21T21:17:06Z"
  }
}