kube-router: BGP Peer Passwords Exposed in Logs at Verbose Logging Level
When kube-router is configured with per-node BGP peer passwords using the kube-router.io/peer.passwords node annotation, and verbose logging is enabled (--v=2 or higher), the raw Kubernetes node annotation map is logged verbatim — including the base64-encoded BGP MD5 passwords. Anyone with access to kube-router's logs (via kubectl logs, log aggregation systems, or shared log dumps during debugging) can extract and decode the BGP peer passwords. The official troubleshooting documentation instructs users to collect logs at -v=2 before filing issues, making accidental disclosure during support interactions a realistic scenario.
The vulnerability is at pkg/controllers/routing/network_routes_controller.go:1129:
```go
// pkg/controllers/routing/network_routes_controller.go:1127-1133
// If the global routing peer is configured then peer with it
// else attempt to get peers from node specific BGP annotations.
if len(nrc.globalPeerRouters) == 0 {
klog.V(2).Infof("Attempting to construct peer configs from annotation: %+v", node.Annotations)
peerCfgs, err := bgpPeerConfigsFromAnnotations(
```
node.Annotations is of type map[string]string. This type does not implement fmt.Stringer, so %+v formatting dumps every key-value pair verbatim. When kube-router.io/peer.passwords is set on the node (the documented mechanism for providing per-node BGP MD5 passwords), its base64-encoded value appears in the log output.
The BGP peer password annotation is documented in docs/user-guide.md and has the constant:
```go
// pkg/controllers/routing/network_routes_controller.go:59
peerPasswordAnnotation = "kube-router.io/peer.passwords"
```
Note that a password-safe String() method exists on PeerConfig and PeerConfigs in pkg/bgp/peer_config.go and is tested:
```go
// pkg/bgp/peer_config.go:63-79
// Custom Stringer to prevent leaking passwords when printed
func (p PeerConfig) String() string {
// ...password field is intentionally omitted...
}
```
However, this protective method is never invoked by the vulnerable log statement, which dumps the raw annotation map before any parsing occurs. The password masking only applies after the annotation is parsed into PeerConfig structs.
The second log statement at line 1510 (klog.Infof("Peer config from %s annotation: %+v", peersAnnotation, peerConfigs)) is not vulnerable — peerConfigs is of type bgp.PeerConfigs which implements fmt.Stringer and correctly masks passwords.
The vulnerable path (bgpPeerConfigsFromIndividualAnnotations) is triggered when the kube-router.io/peers consolidated YAML annotation is not set — i.e., when operators use the older individual annotation format (kube-router.io/peer.ips, kube-router.io/peer.asns, kube-router.io/peer.passwords). This older format remains fully supported and documented.
Setup: Node has per-node BGP peer annotations including a password:
```bash
kubectl annotate node worker-1 \
kube-router.io/peer.ips=192.0.2.1 \
kube-router.io/peer.asns=65001 \
"kube-router.io/peer.passwords=$(echo -n 's3cr3t-bgp-p@ss' | base64)"
```
Trigger: Start kube-router with verbose logging (e.g., following troubleshooting documentation):
```bash
# As documented in docs/troubleshoot.md for debugging:
kube-router ... --v=2
```
Observe: In kube-router pod logs:
```
I0318 10:23:41.123456 1 network_routes_controller.go:1129] Attempting to construct peer configs from annotation:
map[
kube-router.io/peer.asns:65001
kube-router.io/peer.ips:192.0.2.1
kube-router.io/peer.passwords:czNjcjN0LWJncC1wQHNz <-- base64-encoded password
...other annotations...
]
```
Decode the password:
```bash
echo "czNjcjN0LWJncC1wQHNz" | base64 -d
# Output: s3cr3t-bgp-p@ss
```
Impact: With the decoded password and network adjacency to the BGP peer, an attacker can establish an unauthorized BGP session, inject routes, or disrupt legitimate BGP peering.
--v=2 logs before filing issues, creating a realistic path for passwords to be shared in bug reports or support ticketsRemove or redact the vulnerable log statement at line 1129. The diagnostic information it provides (confirming tha
This issue can be reached with local access to the system, attack complexity is high, an attacker needs administrative privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity none, availability none.
GHSA-fcmh-qfxc-w685 is classified as CWE-532: Insertion of Sensitive Information into Log File. Sensitive values are written to logs, which are typically kept longer and read more widely than the data warrants.
GHSA-fcmh-qfxc-w685 is recorded against 1 package.
Published on 8 April 2026 and last revised on 25 June 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.
Details
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:N/A:N
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| github.com/cloudnativelabs/kube-router/v2 | — | — |
References
Similar Threats
Free Vulnerability Check
BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against GHSA-fcmh-qfxc-w685 and other known CVE records.
Scan My Site Free →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.
Stay up to date with the latest from Boteraser.
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
CloudFlare provides web performance and security solutions, enhancing site speed and protecting against threats.
Service URL: developers.cloudflare.com (opens in a new window)
These cookies are needed for adding comments on this website.
These cookies are used for managing login functionality on this website.
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com (opens in a new window)
You can find more information in our Cookie Policy and Privacy Policy.