PHP2Shell: Read our blog on the critical RCE vulnerabilities affecting 70% of the Internet

CVE-2025-70949: 
JavaScript vulnerability analysis and mitigation

Overview

CVE-2025-70949 is an Observable Timing Discrepancy vulnerability in @perfood/couch-auth, a Node.js/Express authentication library for CouchDB and Cloudant. The flaw affects version 0.26.0 and earlier, allowing remote attackers to perform timing side-channel attacks to guess sensitive authentication tokens. It was published on March 5, 2026, and assigned by MITRE. The vulnerability carries a CVSS v3.1 base score of 7.5 (High) (Red Hat CVE, Security Advisory).

Technical details

The vulnerability is classified as CWE-208 (Observable Timing Discrepancy), arising from non-constant-time comparison operations within the authentication logic of @perfood/couch-auth. When the library compares sensitive tokens (such as session tokens or password reset tokens), differences in processing time based on input values can be measured by a remote attacker to progressively narrow down the correct token value through repeated requests. No authentication or user interaction is required to exploit this flaw, as the timing oracle is exposed over the network. A public security advisory and PoC reference were published by researcher 0xHunterr (Security Advisory).

Impact

Successful exploitation allows an unauthenticated remote attacker to infer sensitive token values through measurable response time differences, potentially enabling account takeover or unauthorized access to protected resources. The primary impact is on confidentiality (CVSS C:H), with no direct integrity or availability impact. Given that couch-auth manages authentication tokens for CouchDB-backed APIs and SPAs, a compromised token could grant an attacker access to user databases and private API endpoints (Red Hat CVE, Security Advisory).

Exploitability

A public security advisory with technical details has been published by researcher 0xHunterr, and the vulnerability is referenced in the ENISA EUVD database (EUVD-2025-208328). No evidence of active in-the-wild exploitation or inclusion in CISA's Known Exploited Vulnerabilities (KEV) catalog has been identified. The EPSS score is approximately 0.029% (0.000290), indicating a low probability of exploitation in the near term. No exploit kits or threat actor attribution have been reported (Security Advisory, Red Hat CVE).

Exploitation steps

  1. Reconnaissance: Identify applications using @perfood/couch-auth version 0.26.0 or earlier by inspecting package.json files, npm registry data, or HTTP response headers/behaviors characteristic of couch-auth endpoints (e.g., /auth/login, /auth/password-reset).
  2. Identify timing oracle: Send repeated authentication or token validation requests to the target endpoint with varying token values, measuring response times for each request using a high-resolution timer or network analysis tool.
  3. Measure timing differences: Use a script (e.g., Python with time or requests library) to send a large number of requests with candidate token values, recording response latency for each. Statistical analysis (e.g., averaging over many requests) helps filter network jitter.
  4. Iterative token guessing: Exploit the non-constant-time comparison by progressively refining the token guess character-by-character or bit-by-bit, using timing differences to determine which prefix matches the stored token.
  5. Achieve objective: Once the correct token is recovered, use it to authenticate as the target user, reset their password, or access protected CouchDB databases and API endpoints (Security Advisory).

Indicators of compromise

  • Network: Unusually high volume of repeated requests to authentication endpoints (e.g., /auth/login, /auth/password-reset, /auth/confirm-email) from a single IP or small IP range with slight variations in token parameters.
  • Logs: Server access logs showing many near-identical requests with incrementally varying token values and consistent response codes (e.g., 401 or 400); abnormal request rates to token validation routes.
  • Process/Application: Elevated CPU or I/O on the Node.js process correlating with bursts of authentication requests; unusual patterns in CouchDB _users or sl-users database access logs.

Mitigation and workarounds

Users should upgrade @perfood/couch-auth to a version beyond 0.26.0 that addresses this timing discrepancy by implementing constant-time comparison functions (e.g., Node.js crypto.timingSafeEqual) for all sensitive token comparisons. As a workaround, operators can implement rate limiting on authentication endpoints using the built-in loginRateLimit and passwordResetRateLimit configuration options to reduce the feasibility of timing attacks. Additionally, deploying a reverse proxy or WAF with request rate limiting and anomaly detection can help mitigate exploitation attempts while a patch is applied (Security Advisory, couch-auth GitHub).

Community reactions

The vulnerability was disclosed by researcher 0xHunterr via a public GitHub Gist advisory covering both CVE-2025-70948 and CVE-2025-70949. Social media activity was observed on Mastodon and Bluesky, with automated CVE notification accounts sharing the advisory. Coverage was also noted on aggregator platforms such as Vulners, CVEFeed, and VulDB. No major vendor statements or significant media coverage beyond the initial advisory have been identified (Security Advisory).

Additional resources


Source: This report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-5cjr-rc2p-f66fHIGH8.8
  • JavaScript logoJavaScript
  • ssh-mcp
NoYesOct 23, 2026
GHSA-5www-2x9c-mgr6HIGH8.8
  • JavaScript logoJavaScript
  • @pineforge/codegen-pyodide
NoYesOct 23, 2026
CVE-2026-58497HIGH8.6
  • JavaScript logoJavaScript
  • @zenalexa/unicli
NoYesOct 23, 2026
CVE-2026-115477HIGH7.1
  • JavaScript logoJavaScript
  • obsidian-tc
NoYesOct 23, 2026
GHSA-2g9m-gh52-f39vHIGHN/A
  • JavaScript logoJavaScript
  • koa-static-resolver
NoYesOct 23, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management