GHSA-55f6-4pr5-c7m5: Github.com/kahiteam/kahi Kahi Has Privilege-drop And Socket/log Vulnerability

HIGH
CWE-271 CWE-732
Published
Advisory Summary

GHSA-55f6-4pr5-c7m5 is a HIGH kahi has privilege-drop and socket/log vulnerability (CWE-271: Privilege Dropping / Lowering Errors) affecting Github.com/kahiteam/kahi libraries in the Go ecosystem. The issue involves kahi has privilege-drop and socket/log permission issues. Remediation is available by upgrading affected packages to version 0.1.0-alpha.9.

GHSA-55f6-4pr5-c7m5 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-55f6-4pr5-c7m5
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-271: Privilege Dropping / Lowering Errors
Affected Product Github.com/kahiteam/kahi
Package Ecosystem Go
Published Date
Last Updated

How to Fix GHSA-55f6-4pr5-c7m5

To remediate this vulnerability, upgrade all affected Github.com/kahiteam/kahi 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/kahiteam/kahi fixed: 0.1.0-alpha.9
Upgrade github.com/kahiteam/kahi to 0.1.0-alpha.9
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/kahiteam/kahi

How to Check if You Are Affected

To determine whether your application is affected by GHSA-55f6-4pr5-c7m5, inspect your project dependencies for Github.com/kahiteam/kahi:

inspect dependencies for github.com/kahiteam/kahi

Analyze the terminal output to locate any version of Github.com/kahiteam/kahi in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.0-alpha.9), 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-271: Privilege Dropping / Lowering Errors, where the product does not drop privileges before passing control of a resource to an actor that does not have those privileges. In Github.com/kahiteam/kahi, 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

Kahi releases up to and including v0.1.0-alpha.8 contain three privilege/permission issues, all fixed in v0.1.0-alpha.9. They were identified in a full-codebase security review on 2026-05-26. ## Affected versions All releases <= v0.1.0-alpha.8. ## Patched version v0.1.0-alpha.9. ## Details ### 1. Per-process privilege drop not applied (High) A process configured with `user = "uid:gid"` had its credential resolved but never attached to the spawned child, so the process ran with the supervisor's inherited privileges (root, when the supervisor runs as root) instead of the configured lower-privilege user. The intended privilege isolation did not occur, and no error was raised. ### 2. Privilege drop did not reset supplementary groups (Medium) When the daemon dropped privileges it set the primary gid and uid but never called setgroups(2), so the launching user's supplementary groups (for example `docker`, which is root-equivalent) remained active after the drop and were inherited by child processes. ### 3. FastCGI unix socket world-accessible by default (Medium) A FastCGI unix-domain socket was chmod-ed only when `socket_mode` was explicitly configured. With `socket_mode` unset the socket kept the umask-dependent default (commonly world-accessible), allowing any local user to connect to it. ## Remediation Upgrade to v0.1.0-alpha.9. Privilege handling is now fail-closed: the configured credential is applied or the process refuses to start, supplementary groups are reset via setgroups before setgid/setuid, and FastCGI unix sockets default to 0700. ## Workarounds (for <= v0.1.0-alpha.8) - Do not rely on per-process `user`; run the supervisor directly as the intended unprivileged user. - Set an explicit restrictive `socket_mode` on FastCGI programs. - Avoid running the supervisor as root where possible.

GHSA-55f6-4pr5-c7m5 Affected Github.com/kahiteam/kahi Versions

1 component(s)
Fixed Versions:
0.1.0-alpha.9
Product / Package Ecosystem Affected Versions Fixed Version
github.com/kahiteam/kahi
Go
< 0.1.0-alpha.9
0.1.0-alpha.9

References

Frequently Asked Questions

What is GHSA-55f6-4pr5-c7m5?
GHSA-55f6-4pr5-c7m5 is a security vulnerability in Github.com/kahiteam/kahi involving Kahi has privilege-drop and socket/log permission issues under CWE-271: Privilege Dropping / Lowering Errors.
Which Github.com/kahiteam/kahi versions are affected?
Affected versions include releases prior to 0.1.0-alpha.9 across affected packages: github.com/kahiteam/kahi.
What version fixes GHSA-55f6-4pr5-c7m5?
Upgrading to 0.1.0-alpha.9 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/kahiteam/kahi affected?
Yes, github.com/kahiteam/kahi is affected in releases prior to 0.1.0-alpha.9. Upgrade your dependency to 0.1.0-alpha.9 or later.
What CWE is associated with GHSA-55f6-4pr5-c7m5?
GHSA-55f6-4pr5-c7m5 is classified under CWE-271: Privilege Dropping / Lowering Errors (The product does not drop privileges before passing control of a resource to an actor that does not have those privileges.).
How can I check Go dependencies for GHSA-55f6-4pr5-c7m5?
Run the dependency tree command: 'inspect dependencies for github.com/kahiteam/kahi'. 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-55f6-4pr5-c7m5",
  "modified" : "2026-06-30T18:07:44Z",
  "published" : "2026-06-30T18:07:44Z",
  "aliases" : [ ],
  "summary" : "Kahi has privilege-drop and socket/log permission issues",
  "details" : "Kahi releases up to and including v0.1.0-alpha.8 contain three privilege/permission issues, all fixed in v0.1.0-alpha.9. They were identified in a full-codebase security review on 2026-05-26.\n\n## Affected versions\nAll releases <= v0.1.0-alpha.8.\n\n## Patched version\nv0.1.0-alpha.9.\n\n## Details\n\n### 1. Per-process privilege drop not applied (High)\nA process configured with `user = \"uid:gid\"` had its credential resolved but never attached to the spawned child, so the process ran with the supervisor's inherited privileges (root, when the supervisor runs as root) instead of the configured lower-privilege user. The intended privilege isolation did not occur, and no error was raised.\n\n### 2. Privilege drop did not reset supplementary groups (Medium)\nWhen the daemon dropped privileges it set the primary gid and uid but never called setgroups(2), so the launching user's supplementary groups (for example `docker`, which is root-equivalent) remained active after the drop and were inherited by child processes.\n\n### 3. FastCGI unix socket world-accessible by default (Medium)\nA FastCGI unix-domain socket was chmod-ed only when `socket_mode` was explicitly configured. With `socket_mode` unset the socket kept the umask-dependent default (commonly world-accessible), allowing any local user to connect to it.\n\n## Remediation\nUpgrade to v0.1.0-alpha.9. Privilege handling is now fail-closed: the configured credential is applied or the process refuses to start, supplementary groups are reset via setgroups before setgid/setuid, and FastCGI unix sockets default to 0700.\n\n## Workarounds (for <= v0.1.0-alpha.8)\n- Do not rely on per-process `user`; run the supervisor directly as the intended unprivileged user.\n- Set an explicit restrictive `socket_mode` on FastCGI programs.\n- Avoid running the supervisor as root where possible.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/kahiteam/kahi"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.1.0-alpha.9"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.1.0-alpha.8"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/kahiteam/kahi/security/advisories/GHSA-55f6-4pr5-c7m5"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/kahiteam/kahi"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-271", "CWE-732" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-30T18:07:44Z",
    "nvd_published_at" : null
  }
}