CVE-2026-58270

CVE-2026-58270 is a medium-severity inefficient regular expression (ReDoS) vulnerability in @sync-in/server (npm), affecting versions <= 2.3.0. It is fixed in 2.4.0.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Sync-in Server has a ReDoS via Unsanitized Regex in Sync Diff pathFilters

Affected component: Sync-in Server v2.3.0, POST /api/app/sync/operation/diff/:id, vulnerable implementation of pathFilters in backend/src/applications/sync/dtos/sync-operations.dto.ts.

In the vulnerable version, the sync diff endpoint accepted a user-controlled regex pattern through pathFilters and compiled it into a RegExp without complexity validation. The resulting regex was then executed synchronously against relative file paths during diff generation.

A catastrophic-backtracking pattern, such as ^(a+)+b, can block the affected Node.js event loop when evaluated against a worst-case path shape. In a single-process deployment, this can make the server unavailable to other users while the regex evaluation is running. Repeated malicious requests can sustain the denial of service.

Details

SyncDiffDto transformed user input directly into a RegExp without validating regex complexity:

// backend/src/applications/sync/dtos/sync-operations.dto.ts
@IsOptional()
@Transform(({ value }) => (typeof value === 'string' && value.length > 0 ? new RegExp(value, 'i') : null))
pathFilters?: RegExp = null

The compiled regex was then executed synchronously during sync diff traversal:

// backend/src/applications/sync/services/sync-manager.service.ts
if (ctx.syncDiff.pathFilters && ctx.syncDiff.pathFilters.test(filePath)) {

Because .test() is synchronous, a catastrophic-backtracking pattern can block the Node.js event loop for the duration of the regex evaluation.

The impact depends on the file paths being tested. For example, the pattern ^(a+)+b is most effective when the sync tree contains a relative path beginning with a long sequence of a characters and not followed by b.

PoC

Prerequisites: Valid non-guest account, a registered sync client, and a sync path containing at least one file or directory whose relative path triggers catastrophic backtracking for the supplied pattern.

For the payload ^(a+)+b, an effective test case is a path containing a long name made of repeated a characters.

Steps:

  1. Register a sync client: POST /api/app/sync/register with credentials and clientId.
  2. Authenticate: POST /api/app/sync/auth/cookie to get a JWT with clientId embedded.
  3. Create or use a sync path targeting an application-managed directory containing files.
  4. Ensure the sync path contains a worst-case filename or directory name for the regex, for example a long sequence of a characters.
  5. Send a diff request with the ReDoS pattern:
POST /api/app/sync/operation/diff/1
Content-Type: application/json
sync-in-csrf: <csrf-token>
Cookie: sync-in-access=<jwt>

{"secureDiff":false,"firstSync":true,"defaultFilters":[],"pathFilters":"^(a+)+b","snapshot":{}}

Evidence from live test on Sync-in Server v2.3.0, Node.js v24.16.0:

[+] Baseline (no pathFilters): 0.019s, 15 files
[*] Sending ReDoS pattern: ^(a+)+b
[!] TIMEOUT after 20.022s - ReDoS CONFIRMED

# Server state during ReDoS:
$ docker stats sync-in --no-stream
CONTAINER   CPU %     MEM USAGE
sync-in     398.82%   745.2MiB / 7.709GiB

# Other endpoints did not respond during the timeout window:
$ curl -m 5 http://target:8080/
(exit code 28 - connection timeout)

The container-level CPU spike indicates severe resource saturation while the endpoint was unresponsive. The request timeout demonstrates event-loop blocking during the observed window, but does not by itself prove permanent failure after the malicious request stops.

Impact

An authenticated user with desktop sync access can submit a malicious pathFilters regex that blocks the affected Node.js event loop during sync diff generation.

In a single-process deployment, this can prevent other HTTP requests, including health checks, from receiving responses while the regex evaluation is running. Repeated malicious requests can keep the service unavailable and may require administrative intervention.

A regular expression with worst-case exponential or polynomial matching time is applied to untrusted input, causing excessive CPU use. Typical impact: denial of service when input is crafted to trigger backtracking.

CVE-2026-58270 has a CVSS score of 6.5 (Medium). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.4.0); upgrading removes the vulnerable code path.

Affected versions

@sync-in/server (<= 2.3.0)

Security releases

@sync-in/server → 2.4.0 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Validate pathFilters before using the resulting regex during diff traversal.

Recommended controls:

  • Reject empty or non-string values.
  • Enforce a maximum regex pattern length.
  • Reject invalid regex syntax.
  • Reject unsafe regex patterns using safe-regex2 or an equivalent safety checker.
  • Return a BadRequestException for invalid or unsafe patterns.

Example remediation:

@IsOptional()
@Transform(({ value }) => {
  if (typeof value !== 'string' || value.length === 0) return null

  if (value.length > MAX_PATH_FILTER_PATTERN_LENGTH) {
    throw new BadRequestException('Path filter pattern is too long')
  }

  let pathFilter: RegExp
  try {
    pathFilter = new RegExp(value, 'i')
  } catch {
    throw new BadRequestException('Invalid path filter pattern')
  }

  if (!isSafePattern(pathFilter)) {
    throw new BadRequestException('Unsafe path filter pattern')
  }

  return pathFilter
})
pathFilters?: RegExp = null

Where isSafePattern uses safe-regex2 or equivalent to reject patterns likely to cause catastrophic backtracking, including nested quantifier patterns such as ^(a+)+b.

A regression test should assert that ^(a+)+b is rejected before the regex is used against file paths.

Frequently Asked Questions

  1. What is CVE-2026-58270? CVE-2026-58270 is a medium-severity inefficient regular expression (ReDoS) vulnerability in @sync-in/server (npm), affecting versions <= 2.3.0. It is fixed in 2.4.0. A regular expression with worst-case exponential or polynomial matching time is applied to untrusted input, causing excessive CPU use.
  2. How severe is CVE-2026-58270? CVE-2026-58270 has a CVSS score of 6.5 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of @sync-in/server are affected by CVE-2026-58270? @sync-in/server (npm) versions <= 2.3.0 is affected.
  4. Is there a fix for CVE-2026-58270? Yes. CVE-2026-58270 is fixed in 2.4.0. Upgrade to this version or later.
  5. Is CVE-2026-58270 exploitable, and should I be worried? Whether CVE-2026-58270 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-58270 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-58270? Upgrade @sync-in/server to 2.4.0 or later.

Other vulnerabilities in @sync-in/server

Stop the waste.
Protect your environment with Kodem.