Vulnerabilities in pkg:golang/github.com/ncarlier/webhookd

PACKAGE
Advisory Identifier: GHSA-v25g-mvwr-f5fp
Advisory Summary

CVE-2026-59157 is a MODERATE (CVSS 6.5) unrestricted http header to shell vulnerability (CWE-807: Reliance on Untrusted Inputs in a Security Decision) affecting webhookd libraries in the Go ecosystem. The issue involves unrestricted http header to shell variable injection. Remediation is available by upgrading affected packages to version 1.22.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/ncarlier/webhookd

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/ncarlier/webhookd. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-v25g-mvwr-f5fp CVE-2026-59157 MODERATE webhookd: Unrestricted HTTP Header to Shell Variable Injection

CVE-2026-59157 at a Glance

CVE Identifier CVE-2026-59157
GHSA Identifier GHSA-v25g-mvwr-f5fp
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-807: Reliance on Untrusted Inputs in a Security Decision
Affected Product webhookd
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.5

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:L/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 Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-59157

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

github.com/ncarlier/webhookd fixed: 1.22.0
Upgrade github.com/ncarlier/webhookd to 1.22.0
Verify Direct and Transitive Dependencies

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

inspect dependencies for github.com/ncarlier/webhookd

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-59157, inspect your project dependencies for webhookd:

inspect dependencies for github.com/ncarlier/webhookd

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

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-807: Reliance on Untrusted Inputs in a Security Decision, where the product uses a protection mechanism that relies on the existence or values of an input, but the input can be modified by an untrusted actor in a way that bypasses the protection mechanism. In webhookd, 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

## Description Before 1.22, if the Basic Auth (`htpasswd`) middleware was not configured, all incoming HTTP headers were blindly forwarded to the webhook script execution environment as shell variables. While the Basic Auth middleware correctly strips the authentication header (`X-WebAuthn-User`) from the incoming request before conditionally re-injecting it on successful authentication, disabling Basic Auth left the system vulnerable if deployed behind an unhardened reverse proxy. ## Impact If an upstream reverse proxy is not properly hardened to strip client-provided authentication headers, an attacker could manually supply these headers (e.g., `X-WebAuthn-User`). A webhook script relying on this forwarded header for privilege elevation or identity verification could therefore be exploited to bypass security controls and impersonate other users. ## Mitigation The `WHD_ALLOWED_UPSTREAM_HEADERS` configuration setting has been introduced to enforce a strict allowlist of HTTP headers that can be converted into shell variables. Additionally, the default behavior has been changed to adhere to the principle of least privilege. It is no longer `*` (allow all). The default allowed headers are now restricted to standard operational headers: `Accept,Content-Type,Content-Length,User-Agent,X-Forwarded-For` Administrators relying on upstream authentication proxies must explicitly add their authentication headers (e.g., `WHD_ALLOWED_UPSTREAM_HEADERS="Accept,Content-Type,Content-Length,User-Agent,X-Forwarded-For,x-webauthn-user"`) to ensure they are passed to the scripts securely.

CVE-2026-59157 Affected webhookd Versions

1 component(s)
Fixed Versions:
1.22.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/ncarlier/webhookd
Go
< 1.22.0
1.22.0

References

Frequently Asked Questions

What is CVE-2026-59157?
CVE-2026-59157 is a security vulnerability in webhookd involving Unrestricted HTTP Header to Shell Variable Injection under CWE-807: Reliance on Untrusted Inputs in a Security Decision.
Which webhookd versions are affected?
Affected versions include releases prior to 1.22.0 across affected packages: github.com/ncarlier/webhookd.
What version fixes CVE-2026-59157?
Upgrading to 1.22.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/ncarlier/webhookd affected?
Yes, github.com/ncarlier/webhookd is affected in releases prior to 1.22.0. Upgrade your dependency to 1.22.0 or later.
What is the CVSS score of CVE-2026-59157?
CVE-2026-59157 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2026-59157?
CVE-2026-59157 is classified under CWE-807: Reliance on Untrusted Inputs in a Security Decision (The product uses a protection mechanism that relies on the existence or values of an input, but the input can be modified by an untrusted actor in a way that bypasses the protection mechanism.).
How can I check Go dependencies for CVE-2026-59157?
Run the dependency tree command: 'inspect dependencies for github.com/ncarlier/webhookd'. 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-v25g-mvwr-f5fp",
  "modified" : "2026-09-09T23:47:03Z",
  "published" : "2026-09-09T23:47:03Z",
  "aliases" : [ "CVE-2026-59157" ],
  "summary" : "webhookd: Unrestricted HTTP Header to Shell Variable Injection",
  "details" : "## Description\nBefore 1.22, if the Basic Auth (`htpasswd`) middleware was not configured, all incoming HTTP headers were blindly forwarded to the webhook script execution environment as shell variables. While the Basic Auth middleware correctly strips the authentication header (`X-WebAuthn-User`) from the incoming request before conditionally re-injecting it on successful authentication, disabling Basic Auth left the system vulnerable if deployed behind an unhardened reverse proxy.\n\n## Impact\nIf an upstream reverse proxy is not properly hardened to strip client-provided authentication headers, an attacker could manually supply these headers (e.g., `X-WebAuthn-User`). A webhook script relying on this forwarded header for privilege elevation or identity verification could therefore be exploited to bypass security controls and impersonate other users.\n\n## Mitigation\nThe `WHD_ALLOWED_UPSTREAM_HEADERS` configuration setting has been introduced to enforce a strict allowlist of HTTP headers that can be converted into shell variables. \n\nAdditionally, the default behavior has been changed to adhere to the principle of least privilege. It is no longer `*` (allow all). The default allowed headers are now restricted to standard operational headers:\n`Accept,Content-Type,Content-Length,User-Agent,X-Forwarded-For`\n\nAdministrators relying on upstream authentication proxies must explicitly add their authentication headers (e.g., `WHD_ALLOWED_UPSTREAM_HEADERS=\"Accept,Content-Type,Content-Length,User-Agent,X-Forwarded-For,x-webauthn-user\"`) to ensure they are passed to the scripts securely.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/ncarlier/webhookd"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.22.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ncarlier/webhookd/security/advisories/GHSA-v25g-mvwr-f5fp"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ncarlier/webhookd"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ncarlier/webhookd/releases/tag/v1.22.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-290", "CWE-807" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-09T23:47:03Z",
    "nvd_published_at" : null
  }
}