Summary
A nil pointer dereference in tunnelCloseHandler causes the handler goroutine to panic whenever a reverse tunnel (rportfwd) close is attempted. Both the legitimate close path AND the unauthorized close path dereference tunnel.SessionID where tunnel is guaranteed nil. This means rportfwd tunnels can never be cleanly closed, and any authenticated implant can trigger repeated goroutine panics.
Details
File: server/handlers/sessions.go lines 172 and 175
The function enters an else block precisely because core.Tunnels.Get(tunnelData.TunnelID) returned nil. Both conditions inside that else block then dereference tunnel.SessionID instead of rtunnel.SessionID:
} else {
rtunnel := rtunnels.GetRTunnel(tunnelData.TunnelID)
if rtunnel != nil && session.ID == tunnel.SessionID { // LINE 172, nil deref
rtunnel.Close()
rtunnels.RemoveRTunnel(rtunnel.ID)
} else if rtunnel != nil && session.ID != tunnel.SessionID { // LINE 175, nil deref
sessionHandlerLog.Warnf("...")
}
}
Note: The identical bug was already fixed in tunnelDataHandler at lines 124/126 (correctly uses rtunnel.SessionID), but the fix was
not applied to tunnelCloseHandler.
PoC
tunnel := GetTunnel(999) // returns nil, no normal tunnel with this ID
// tunnel is nil here
rtunnel := GetRTunnel(999) // returns valid rtunnel owned by session-AAAA
// Both lines below panic with:
// runtime error: invalid memory address or nil pointer dereference
if rtunnel != nil && sessionID == tunnel.SessionID { ... } // line 172
} else if rtunnel != nil && sessionID != tunnel.SessionID { ... } // line 175
Confirmed on master commit 7ac4db3fa with standalone reproducer.
Output:
PANIC on line 172 (legitimate close): runtime error: invalid memory address or nil pointer dereference
PANIC on line 175 (unauthorized close): runtime error: invalid memory address or nil pointer dereference
Impact
- rportfwd tunnels cannot be closed, functional regression
- Any authenticated implant can trigger repeated handler goroutine panics
- rtunnel map entries leak (never cleaned up on close failure)
recoverAndLogPanic()prevents full server crash but silently drops the close operation
The application dereferences a null pointer, causing a crash. Typical impact: denial of service via crash.
Affected versions
Security releases
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.
Remediation advice
Replace tunnel.SessionID with rtunnel.SessionID on both lines:
- if rtunnel != nil && session.ID == tunnel.SessionID {
+ if rtunnel != nil && session.ID == rtunnel.SessionID {
rtunnel.Close()
rtunnels.RemoveRTunnel(rtunnel.ID)
- } else if rtunnel != nil && session.ID != tunnel.SessionID {
+ } else if rtunnel != nil && session.ID != rtunnel.SessionID {
Frequently Asked Questions
- What is GHSA-C279-989M-238F? GHSA-C279-989M-238F is a high-severity null pointer dereference vulnerability in github.com/bishopfox/sliver (go), affecting versions <= 1.7.3. No fixed version is listed yet. The application dereferences a null pointer, causing a crash.
- Which versions of github.com/bishopfox/sliver are affected by GHSA-C279-989M-238F? github.com/bishopfox/sliver (go) versions <= 1.7.3 is affected.
- Is there a fix for GHSA-C279-989M-238F? No fixed version is listed for GHSA-C279-989M-238F yet. Monitor the advisory for updates and apply mitigations in the interim.
- Is GHSA-C279-989M-238F exploitable, and should I be worried? Whether GHSA-C279-989M-238F 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
- What actually determines whether GHSA-C279-989M-238F 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.
- How do I fix GHSA-C279-989M-238F? No fixed version is listed yet. In the interim: Keep the dependency up to date. Ensure all pointers and return values are checked for null before use.