CVE-2024-35196
Executive Summary
CVE-2024-35196 is a low-severity information disclosure vulnerability in Sentry, a developer-first error tracking and performance monitoring platform. The flaw resides in Sentry’s Slack integration, which incorrectly records the incoming request body in logs. This request data can contain sensitive information, including the deprecated Slack verification token. Under specific configurations, an attacker with access to these logs could forge requests and act as the Slack integration, potentially leading to unauthorized actions. The vulnerability has a CVSS score of 2.0, indicating low severity, but it poses a significant risk to self-hosted instances that rely on the legacy verification token. SaaS users are not affected. The recommended fix is to upgrade to version 24.5.0 or higher, rotate the Slack verification token, and use the Slack Signing Secret instead.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is not directly related to a package manager (NPM, PyPI, Go, Ruby) but affects the Sentry platform itself. Self-hosted users should ensure they are running a patched version (24.5.0 or higher) and follow the configuration changes to use the Slack Signing Secret.
CVSS Breakdown & Threat Level
- CVSS Score: 2.0 (Low)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: Low (leakage of verification token)
- Integrity Impact: None
- Availability Impact: None
- Threat Level: Low, but with potential for escalation if the leaked token is used to forge requests.
Deep Dive & Mechanics
The vulnerability is rooted in Sentry’s logging mechanism for the Slack integration. When a webhook request is received from Slack, Sentry logs the incoming request body for debugging purposes. The log entries match the pattern event == "slack.*" && name == "sentry.integrations.slack" && request_data == *. The deprecated Slack verification token is stored in the request_data.token key. This token, if leaked, can be used by an attacker to forge requests that appear legitimate to the Slack integration, especially if the integration is configured to use the verification token for authentication.
The issue is exacerbated by the fact that the verification token is deprecated by Slack in favor of the Signing Secret. Sentry’s default configuration may still log the token, exposing it to anyone with access to the logs. Self-hosted instances that have not migrated to the Signing Secret are particularly vulnerable.
Vulnerable vs. Patched Code
Vulnerable Code (pre-24.5.0):
The logging configuration in src/sentry/conf/server.py may log the entire request body, including the token field, without sanitization.
# Example vulnerable logging configuration
LOGGING = {
'version': 1,
'handlers': {
'console': {
'class': 'logging.StreamHandler',
'formatter': 'default',
},
},
'loggers': {
'sentry.integrations.slack': {
'handlers': ['console'],
'level': 'DEBUG',
},
},
}
Patched Code (24.5.0+):
The patched version either removes the logging of the request body or sanitizes it to exclude sensitive fields like token. Additionally, the integration now prioritizes the Slack Signing Secret over the verification token.
# Example patched logging configuration
LOGGING = {
'version': 1,
'handlers': {
'console': {
'class': 'logging.StreamHandler',
'formatter': 'default',
},
},
'loggers': {
'sentry.integrations.slack': {
'handlers': ['console'],
'level': 'INFO', # Reduced from DEBUG to INFO
},
},
}
Exploitation & Lab Setup
Red Team
Prerequisites:
- Access to Sentry logs (e.g., via log aggregation system or direct file access).
- The logs must contain entries matching
event == "slack.*" && name == "sentry.integrations.slack" && request_data == *.
Exploitation Steps:
- Extract the Verification Token: Search the logs for
request_data.tokento obtain the deprecated Slack verification token. - Forge a Request: Use the token to craft a malicious webhook request to the Sentry Slack integration endpoint.
- Execute Actions: Depending on the integration’s capabilities, the attacker could trigger actions such as posting messages, creating incidents, or accessing sensitive data.
Example Forged Request (using curl):
curl -X POST https://your-sentry-instance.com/api/0/slack/webhook/ \
-H "Content-Type: application/json" \
-d '{"token": "EXTRACTED_TOKEN", "team_id": "T12345", "event": "message", "text": "Malicious action"}'
Blue Team
Detection:
- Monitor for unusual log access patterns, especially for logs containing
request_data.token. - Alert on any use of the deprecated Slack verification token in webhook requests.
- Review Sentry logs for any unauthorized access or anomalies.
Mitigation:
- Immediately upgrade to Sentry 24.5.0 or higher.
- Rotate the Slack verification token.
- Configure the integration to use the Slack Signing Secret instead of the verification token.
- Adjust logging configuration to exclude sensitive data.
Indicators of Compromise (IOCs)
- Log Entries: Logs containing
event == "slack.*" && name == "sentry.integrations.slack" && request_data == *with atokenfield. - Network Traffic: Unusual POST requests to the Sentry Slack webhook endpoint with a
tokenparameter. - Configuration Changes: Any modification to the Slack integration settings, especially the verification token.
Detection Engineering
YARA Rule
rule CVE_2024_35196_Sentry_Slack_Token_Leak {
meta:
description = "Detects log entries containing Slack verification token from Sentry"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-35196"
strings:
$s1 = "sentry.integrations.slack" ascii wide nocase
$s2 = "request_data" ascii wide nocase
$s3 = "token" ascii wide nocase
condition:
all of them
}
Sigma Rule
title: CVE-2024-35196 - Sentry Slack Verification Token Leak
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects log entries from Sentry's Slack integration that may contain the deprecated verification token.
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2024-35196
logsource:
product: sentry
service: slack_integration
detection:
selection:
event: "slack.*"
name: "sentry.integrations.slack"
request_data|contains: "token"
condition: selection
falsepositives:
- Legitimate debugging logs during development
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-35196 - Sentry Slack Verification Token Leak"; flow:to_server; content:"POST"; http_method; content:"/api/0/slack/webhook/"; http_uri; content:"token"; http_client_body; classtype:attempted-recon; sid:1000001; rev:1;)
Remediation & Mitigation
- Upgrade Sentry: Upgrade to version 24.5.0 or higher immediately.
- Rotate Slack Verification Token: Generate a new verification token in the Slack app settings and update Sentry configuration.
- Use Slack Signing Secret: Configure Sentry to use the Slack Signing Secret instead of the verification token. This is the recommended method for authenticating webhooks.
- Adjust Logging: If unable to upgrade, modify the logging configuration in
src/sentry/conf/server.pyto exclude sensitive data or reduce log verbosity. - Restart Services: After making configuration changes, restart Sentry services to apply them.
- Monitor Logs: Regularly review logs for any signs of token leakage or unauthorized access.
Valters IT