Vulnerabilities in pkg:npm/client-certificate-auth

PACKAGE
Advisory Identifier: GHSA-m4w9-gch5-c2g4
Advisory Summary

CVE-2026-25651 is a MODERATE (CVSS 6.1) client-certificate-auth vulnerable to open redirect vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Client certificate auth libraries in the npm ecosystem. The issue involves client-certificate-auth vulnerable to open redirect via host header injection in http-to-https redirect. Remediation is available by upgrading affected packages to version 1.0.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/client-certificate-auth

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/client-certificate-auth. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-m4w9-gch5-c2g4 CVE-2026-25651 MODERATE client-certificate-auth Vulnerable to Open Redirect via Host Header Injection in HTTP-to-HTTPS redirect

CVE-2026-25651 at a Glance

CVE Identifier CVE-2026-25651
GHSA Identifier GHSA-m4w9-gch5-c2g4
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
Affected Product Client certificate auth
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.1

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:R/S:C/C:L/I:L/A:N).

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

How to Fix CVE-2026-25651

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

client-certificate-auth fixed: 1.0.0
npm install client-certificate-auth@1.0.0
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 client-certificate-auth

How to Check if You Are Affected

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

npm ls client-certificate-auth

Analyze the terminal output to locate any version of Client certificate auth in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.0), your application is affected.

Note: The npm ls client-certificate-auth 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-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Client certificate auth, 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 Versions 0.2.1 and 0.3.0 of `client-certificate-auth` contain an open redirect vulnerability. The middleware unconditionally redirects HTTP requests to HTTPS using the unvalidated `Host` header, allowing an attacker to redirect users to arbitrary domains. ### Vulnerable Code ```javascript // lib/clientCertificateAuth.js (versions 0.2.1, 0.3.0) if (!req.secure && req.header('x-forwarded-proto') != 'https') { return res.redirect('https://' + req.header('host') + req.url); } ``` ### Attack Scenario 1. Attacker crafts a link: `http://vulnerable-app.example.com/login` 2. When victim clicks, attacker intercepts and injects header: `Host: attacker.com` 3. Server responds: `302 Found → https://attacker.com/login` 4. Victim is redirected to attacker-controlled site ### Impact - **Phishing**: Attackers can use trusted domain links to redirect victims to credential-harvesting pages - **OAuth/SSO Token Theft**: In authentication flows, authorization codes or tokens may leak via redirect - **Referer Leakage**: Sensitive URL parameters may be exposed to attacker domains via the Referer header - **Cache Poisoning**: In deployments with shared caches, malicious redirects may be cached and served to other users ### Exploitability Exploitation requires that HTTP traffic reaches the Node.js application without TLS termination setting `x-forwarded-proto: https`. This condition is uncommon in production deployments behind modern reverse proxies or load balancers, which limits real-world exploitability. ### Fix The vulnerable redirect behavior has been completely removed in version 1.0.0. ```bash npm install client-certificate-auth@^1.0.0 ``` ### Workarounds If upgrading is not immediately possible: 1. Block HTTP traffic at the network/load balancer level 2. Ensure your reverse proxy always sets `x-forwarded-proto: https` 3. Add middleware before `clientCertificateAuth` to validate the `Host` header against an allowlist ### References - [CWE-601: URL Redirection to Untrusted Site](https://cwe.mitre.org/data/definitions/601.html) - [OWASP: Unvalidated Redirects and Forwards](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) - [Fix Commit](https://github.com/tgies/client-certificate-auth/commit/8fc995e953db483495be46862965e50fe9e1cc52)

CVE-2026-25651 Affected Client certificate auth Versions

1 component(s)
Fixed Versions:
1.0.0
Product / Package Ecosystem Affected Versions Fixed Version
client-certificate-auth
npm
≥ 0.2.1
< 1.0.0
1.0.0

References

Frequently Asked Questions

What is CVE-2026-25651?
CVE-2026-25651 is a security vulnerability in Client certificate auth involving client-certificate-auth Vulnerable to Open Redirect via Host Header Injection in HTTP-to-HTTPS redirect under CWE-601: URL Redirection to Untrusted Site ('Open Redirect').
Which Client certificate auth versions are affected?
Affected versions include releases prior to 1.0.0 across affected packages: client-certificate-auth.
What version fixes CVE-2026-25651?
Upgrading to 1.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is client-certificate-auth affected?
Yes, client-certificate-auth is affected in releases prior to 1.0.0. Upgrade your dependency to 1.0.0 or later.
What is the CVSS score of CVE-2026-25651?
CVE-2026-25651 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2026-25651?
CVE-2026-25651 is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect') (The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.).
How can I check npm dependencies for CVE-2026-25651?
Run the dependency tree command: 'npm ls client-certificate-auth'. 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-m4w9-gch5-c2g4",
  "modified" : "2026-02-06T21:43:18Z",
  "published" : "2026-02-06T18:54:33Z",
  "aliases" : [ "CVE-2026-25651" ],
  "summary" : "client-certificate-auth Vulnerable to Open Redirect via Host Header Injection in HTTP-to-HTTPS redirect",
  "details" : "### Summary\n\nVersions 0.2.1 and 0.3.0 of `client-certificate-auth` contain an open redirect vulnerability. The middleware unconditionally redirects HTTP requests to HTTPS using the unvalidated `Host` header, allowing an attacker to redirect users to arbitrary domains.\n\n### Vulnerable Code\n\n```javascript\n// lib/clientCertificateAuth.js (versions 0.2.1, 0.3.0)\nif (!req.secure && req.header('x-forwarded-proto') != 'https') {\n  return res.redirect('https://' + req.header('host') + req.url);\n}\n```\n\n### Attack Scenario\n\n1. Attacker crafts a link: `http://vulnerable-app.example.com/login`\n2. When victim clicks, attacker intercepts and injects header: `Host: attacker.com`\n3. Server responds: `302 Found → https://attacker.com/login`\n4. Victim is redirected to attacker-controlled site\n\n### Impact\n\n- **Phishing**: Attackers can use trusted domain links to redirect victims to credential-harvesting pages\n- **OAuth/SSO Token Theft**: In authentication flows, authorization codes or tokens may leak via redirect\n- **Referer Leakage**: Sensitive URL parameters may be exposed to attacker domains via the Referer header\n- **Cache Poisoning**: In deployments with shared caches, malicious redirects may be cached and served to other users\n\n### Exploitability\n\nExploitation requires that HTTP traffic reaches the Node.js application without TLS termination setting `x-forwarded-proto: https`. This condition is uncommon in production deployments behind modern reverse proxies or load balancers, which limits real-world exploitability.\n\n### Fix\n\nThe vulnerable redirect behavior has been completely removed in version 1.0.0.\n\n```bash\nnpm install client-certificate-auth@^1.0.0\n```\n\n### Workarounds\n\nIf upgrading is not immediately possible:\n\n1. Block HTTP traffic at the network/load balancer level\n2. Ensure your reverse proxy always sets `x-forwarded-proto: https`\n3. Add middleware before `clientCertificateAuth` to validate the `Host` header against an allowlist\n\n### References\n\n- [CWE-601: URL Redirection to Untrusted Site](https://cwe.mitre.org/data/definitions/601.html)\n- [OWASP: Unvalidated Redirects and Forwards](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html)\n- [Fix Commit](https://github.com/tgies/client-certificate-auth/commit/8fc995e953db483495be46862965e50fe9e1cc52)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "client-certificate-auth"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.2.1"
      }, {
        "fixed" : "1.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/tgies/client-certificate-auth/security/advisories/GHSA-m4w9-gch5-c2g4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-25651"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tgies/client-certificate-auth/commit/8fc995e953db483495be46862965e50fe9e1cc52"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/tgies/client-certificate-auth"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tgies/client-certificate-auth/releases/tag/v1.0.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-601" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-02-06T18:54:33Z",
    "nvd_published_at" : "2026-02-06T19:16:09Z"
  }
}