修复版本
1.2.1
CVE-2018-6596 is a critical timing attack vulnerability affecting versions of django-anymail up to 1.2.1. This flaw allows remote attackers to potentially manipulate email tracking data by exploiting a weakness in the WEBHOOK_AUTHORIZATION secret. The vulnerability was publicly disclosed on July 12, 2018, and a patch is available in version 1.2.1.
The core of this vulnerability lies in the implementation of webhook authorization within django-anymail. The WEBHOOK_AUTHORIZATION secret, intended to verify the authenticity of incoming webhook requests (used for tracking email opens and clicks), is susceptible to a timing attack. An attacker can repeatedly send requests with different secret values, observing the response times to deduce the correct secret. Once the secret is obtained, the attacker can forge webhook requests, potentially injecting malicious tracking pixels or altering tracking data to appear as if emails were opened or clicked by specific users. This could lead to inaccurate analytics, phishing campaigns disguised as legitimate emails, and reputational damage.
CVE-2018-6596 was publicly disclosed in July 2018. While no active exploitation campaigns have been definitively linked to this specific vulnerability, the timing attack methodology is well-understood and can be adapted to other contexts. The vulnerability's criticality and the potential for data manipulation make it a worthwhile target for attackers. No KEV listing is currently available.
Organizations using django-anymail for email sending and tracking, particularly those relying on webhook integrations for analytics or automation, are at risk. Specifically, deployments using older versions (≤1.2.1) and those with less stringent security practices around webhook authentication are most vulnerable.
• python / server:
import requests
import time
def test_webhook_auth(url, secret):
start_time = time.time()
try:
requests.post(url, headers={'Authorization': f'Bearer {secret}'})
end_time = time.time()
return end_time - start_time
except requests.exceptions.HTTPError as e:
return -1 # Indicate failure
# Example usage (replace with actual URL and secret)
webhook_url = 'http://your-django-anymail-server/webhooks/your_endpoint/'
# Try a few incorrect secrets and measure response times
for i in range(5):
test_secret = f'incorrect_secret_{i}'
response_time = test_webhook_auth(webhook_url, test_secret)
if response_time > 0:
print(f'Secret {test_secret}: Response time = {response_time:.4f} seconds')
else:
print(f'Secret {test_secret}: Authentication failed')disclosure
patch
漏洞利用状态
EPSS
0.51% (66% 百分位)
CVSS 向量
The primary mitigation for CVE-2018-6596 is to upgrade to django-anymail version 1.2.1 or later, which includes a fix for the timing attack vulnerability. If immediate upgrading is not feasible, consider implementing rate limiting on webhook endpoints to make brute-force attacks more difficult. Additionally, carefully review any third-party integrations that rely on email tracking data to ensure their integrity. Implement stricter webhook validation logic if possible, though this is not a substitute for upgrading. After upgrading, confirm the fix by attempting to send a webhook request with an incorrect WEBHOOK_AUTHORIZATION value and verifying that the response time is consistently high, indicating that the secret is properly protected.
暂无官方补丁。请查找临时解决方案或持续关注更新。
漏洞分析和关键警报直接发送到您的邮箱。
CVE-2018-6596 is a critical vulnerability in django-anymail versions up to 1.2.1 that allows attackers to exploit a timing attack on the WEBHOOK_AUTHORIZATION secret, potentially manipulating email tracking data.
You are affected if you are using django-anymail versions 1.2.1 or earlier. Upgrade to 1.2.1 or later to mitigate the risk.
Upgrade to django-anymail version 1.2.1 or later. Consider rate limiting on webhook endpoints as an additional precaution.
While no confirmed active exploitation campaigns are publicly known, the vulnerability's criticality and the ease of exploitation make it a potential target.
Refer to the django-anymail security advisory: https://anymail.readthedocs.io/en/latest/security/
上传你的 requirements.txt 文件,立即知道是否受影响。