CVE-2019-16281
📋 TL;DR
CVE-2019-16281 is an authentication bypass vulnerability in Ptarmigan Lightning Network node software versions before 0.2.3. The vulnerability allows attackers to bypass API token validation and execute unauthorized commands. This affects all users running vulnerable versions of Ptarmigan.
💻 Affected Systems
- Ptarmigan Lightning Network Node
📦 What is this software?
Ptarmigan by Ptarmigan Project
⚠️ Risk & Real-World Impact
Worst Case
Complete compromise of the Lightning Network node, allowing unauthorized fund transfers, channel manipulation, and node takeover.
Likely Case
Unauthorized API access leading to information disclosure, configuration changes, or limited financial impact.
If Mitigated
No impact if proper API token validation is implemented and tokens are kept secure.
🎯 Exploit Status
The exploit is trivial - simply send API requests without valid tokens. The fix commit shows the missing validation code.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 0.2.3 and later
Vendor Advisory: https://github.com/nayutaco/ptarmigan/releases/tag/v0.2.3
Restart Required: Yes
Instructions:
1. Stop the Ptarmigan service. 2. Update to version 0.2.3 or later using your package manager or from GitHub releases. 3. Restart the Ptarmigan service. 4. Verify the version is 0.2.3 or higher.
🔧 Temporary Workarounds
Network Isolation
linuxRestrict API access to trusted networks only using firewall rules
iptables -A INPUT -p tcp --dport [API_PORT] -s [TRUSTED_IP] -j ACCEPT
iptables -A INPUT -p tcp --dport [API_PORT] -j DROP
API Disablement
allDisable the vulnerable API if not required for operation
Edit configuration to disable API or set API port to 0
🧯 If You Can't Patch
- Implement network-level authentication (VPN, IP whitelisting) for API access
- Use reverse proxy with additional authentication layer in front of Ptarmigan API
🔍 How to Verify
Check if Vulnerable:
Check if Ptarmigan version is below 0.2.3. Attempt API call without authentication token - if it succeeds, system is vulnerable.
Check Version:
ptarmigan --version or check the version in configuration/logs
Verify Fix Applied:
After patching, attempt API call without authentication token - it should fail with authentication error.
📡 Detection & Monitoring
Log Indicators:
- Successful API calls without authentication tokens
- API authentication failures followed by successful requests
Network Indicators:
- API requests without authentication headers
- Unusual API traffic patterns from unexpected sources
SIEM Query:
source="ptarmigan.log" AND ("API call" OR "authentication") AND NOT "token"
🔗 References
- https://github.com/nayutaco/ptarmigan/commit/37fd8f9da3bab9d323ddd77f2fd20b6dde8bcf6c
- https://github.com/nayutaco/ptarmigan/compare/v0.2.2...v0.2.3
- https://github.com/nayutaco/ptarmigan/releases/tag/v0.2.3
- https://github.com/nayutaco/ptarmigan/commit/37fd8f9da3bab9d323ddd77f2fd20b6dde8bcf6c
- https://github.com/nayutaco/ptarmigan/compare/v0.2.2...v0.2.3
- https://github.com/nayutaco/ptarmigan/releases/tag/v0.2.3