CVE-2023-28609
📋 TL;DR
CVE-2023-28609 is an authentication bypass vulnerability in Ansible Semaphore's API authentication handler. It allows attackers to bypass authentication mechanisms and gain unauthorized access to the Semaphore web interface. This affects all users running Ansible Semaphore versions before 2.8.89.
💻 Affected Systems
- Ansible Semaphore
📦 What is this software?
Ansible Semaphore by Ansible Semaphore
⚠️ Risk & Real-World Impact
Worst Case
Complete compromise of the Ansible Semaphore instance, allowing attackers to execute arbitrary Ansible playbooks, access sensitive credentials, and potentially pivot to other systems in the infrastructure.
Likely Case
Unauthorized access to the Semaphore dashboard, allowing attackers to view, modify, or execute Ansible playbooks, potentially leading to configuration changes or credential theft.
If Mitigated
Limited impact if network segmentation restricts access to Semaphore and strong monitoring detects authentication anomalies.
🎯 Exploit Status
The vulnerability is in authentication logic, making exploitation straightforward once the issue is understood.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 2.8.89 and later
Vendor Advisory: https://github.com/ansible-semaphore/semaphore/releases/tag/v2.8.89
Restart Required: Yes
Instructions:
1. Backup your current Semaphore configuration and database. 2. Stop the Semaphore service. 3. Update to version 2.8.89 or later using your package manager or by downloading from GitHub releases. 4. Restart the Semaphore service. 5. Verify the version is 2.8.89 or higher.
🔧 Temporary Workarounds
Network Access Restriction
linuxRestrict network access to Semaphore using firewall rules to only allow trusted IP addresses.
# Example iptables rule: iptables -A INPUT -p tcp --dport 3000 -s trusted_ip_range -j ACCEPT
# Example ufw rule: ufw allow from trusted_ip_range to any port 3000
🧯 If You Can't Patch
- Implement strict network segmentation to isolate Semaphore from untrusted networks
- Enable detailed authentication logging and implement SIEM alerts for failed or anomalous authentication attempts
🔍 How to Verify
Check if Vulnerable:
Check the Semaphore version via the web interface dashboard or by examining the running container/process version.
Check Version:
curl -s http://localhost:3000/api/ping | grep version || docker inspect semaphore | grep version
Verify Fix Applied:
Confirm the version is 2.8.89 or higher and test authentication with invalid credentials to ensure proper rejection.
📡 Detection & Monitoring
Log Indicators:
- Authentication attempts from unexpected IP addresses
- Successful logins without proper authentication events
- API requests without corresponding auth tokens
Network Indicators:
- HTTP requests to Semaphore API endpoints without authentication headers
- Unusual traffic patterns to /api/auth endpoints
SIEM Query:
source="semaphore.log" AND (event="login" AND result="success" AND NOT auth_method="password")
🔗 References
- https://github.com/ansible-semaphore/semaphore/commit/3e4a62b7f2b1ef0660c9fb839818a53c80a5a8b1
- https://github.com/ansible-semaphore/semaphore/releases/tag/v2.8.89
- https://github.com/ansible-semaphore/semaphore/commit/3e4a62b7f2b1ef0660c9fb839818a53c80a5a8b1
- https://github.com/ansible-semaphore/semaphore/releases/tag/v2.8.89