CVE-2024-42363
📋 TL;DR
This vulnerability allows remote code execution through unsafe YAML deserialization in the Kubernetes plugin of the Samson deployment tool. Attackers can exploit user-controlled role parameters to execute arbitrary code on affected systems. Organizations using vulnerable versions of Samson with the Kubernetes plugin enabled are at risk.
💻 Affected Systems
- Zendesk Samson with Kubernetes plugin
⚠️ Manual Verification Required
This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.
Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).
🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.
- Review the CVE details at NVD
- Check vendor security advisories for your specific version
- Test if the vulnerability is exploitable in your environment
- Consider updating to the latest version as a precaution
⚠️ Risk & Real-World Impact
Worst Case
Full system compromise allowing attackers to execute arbitrary commands, steal sensitive data, deploy malware, or pivot to other systems in the environment.
Likely Case
Remote code execution leading to data exfiltration, privilege escalation, or deployment of cryptocurrency miners/ransomware.
If Mitigated
Limited impact if proper network segmentation, least privilege, and input validation are implemented, though RCE would still be possible.
🎯 Exploit Status
The vulnerability is straightforward to exploit as it involves YAML deserialization, a common attack vector. No authentication is required to trigger the vulnerable endpoint.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 3385
Vendor Advisory: https://github.com/zendesk/samson/pull/4071
Restart Required: Yes
Instructions:
1. Update Samson to version 3385 or later. 2. Apply the fix from PR #4071 which replaces YAML.load_stream with safe_load_stream. 3. Restart the Samson application.
🔧 Temporary Workarounds
Disable Kubernetes plugin
allTemporarily disable the vulnerable Kubernetes plugin to prevent exploitation
# Check Samson configuration for plugin disabling options
# Typically in config/plugins.yml or environment variables
Network access control
linuxRestrict access to the vulnerable endpoint using network controls
# Use firewall rules to restrict access to the role verification endpoint
# Example: iptables -A INPUT -p tcp --dport <samson_port> -s <trusted_ips> -j ACCEPT
🧯 If You Can't Patch
- Implement strict input validation and sanitization for the role parameter
- Deploy WAF rules to block YAML deserialization payloads and monitor for exploitation attempts
🔍 How to Verify
Check if Vulnerable:
Check if Samson version is below 3385 and the Kubernetes plugin is enabled. Review the code at plugins/kubernetes/app/controllers/kubernetes/role_verifications_controller.rb for unsafe YAML.load_stream usage.
Check Version:
Check Samson version in the application interface or run: grep -r 'VERSION' config/application.rb or similar version file
Verify Fix Applied:
Verify Samson version is 3385 or higher and that YAML.load_stream has been replaced with safe_load_stream in the affected files.
📡 Detection & Monitoring
Log Indicators:
- Unusual YAML payloads in role parameter requests
- Unexpected process execution from Samson
- Errors from YAML parsing in application logs
Network Indicators:
- HTTP requests to /kubernetes/role_verifications with malicious YAML content
- Outbound connections from Samson to unexpected destinations
SIEM Query:
source="samson" AND ("YAML.load_stream" OR "role_verifications" OR "RemoteCodeExecution")
🔗 References
- https://github.com/zendesk/samson/blob/107efb4a252425966aac5e77d0c3670f9b5d7229/plugins/kubernetes/app/controllers/kubernetes/role_verifications_controller.rb#L10
- https://github.com/zendesk/samson/blob/107efb4a252425966aac5e77d0c3670f9b5d7229/plugins/kubernetes/app/controllers/kubernetes/role_verifications_controller.rb#L7
- https://github.com/zendesk/samson/blob/107efb4a252425966aac5e77d0c3670f9b5d7229/plugins/kubernetes/app/models/kubernetes/role_config_file.rb#L80
- https://github.com/zendesk/samson/blob/107efb4a252425966aac5e77d0c3670f9b5d7229/plugins/kubernetes/app/models/kubernetes/util.rb#L9
- https://github.com/zendesk/samson/pull/4071
- https://securitylab.github.com/advisories/GHSL-2023-136_Samson/