CVE-2025-31490·Python vulnerability
AutoGPT is a platform that allows users to create, deploy, and manage continuous artificial intelligence agents that automate complex workflows. Prior to 0.6.1, AutoGPT allows SSRF due to DNS Rebinding in requests wrapper. AutoGPT is built with a wrapper around Python's requests library, hardening the application against SSRF. The code for this wrapper can be found in autogpt_platform/backend/backend/util/request.py. The requested hostname of a URL which is being requested is validated, ensuring that it does not resolve to any local ipv4 or ipv6 addresses. However, this check is not sufficient, as a DNS server may initially respond with a non-blocked address, with a TTL of 0. This means that the initial resolution would appear as a non-blocked address. In this case, validate_url() will return the url as successful. After validate_url() has successfully returned the url, the url is then passed to the real request() function. When the real request() function is called with the validated url, request() will once again resolve the address of the hostname, because the record will not have been cached (due to TTL 0). This resolution may be in the "invalid range". This type of attack is called a "DNS Rebinding Attack". This vulnerability is fixed in 0.6.1.
- Severity
- high
- Software
- Python
- Fixed in
- 0.6.1
- Published
- 2025-04-14
Affected versions
Until: 0.6.1
Fixed in: 0.6.1
How to fix this CVE
Upgrade AutoGPT to version 0.6.1 or later to remediate a DNS rebinding vulnerability in the requests wrapper that could allow server-side request forgery attacks. The vulnerability exploits a validation gap where DNS TTL=0 responses bypass hostname checks, enabling attackers to redirect requests to restricted internal addresses after initial validation. Ensure your deployment uses the patched version and apply this update within your standard maintenance window.
sudo dnf update python3-autogptDefensia detects this vulnerability
What an exploitation attempt looks like
Sample log line indicative of exploitation attempts:
POST|GET requests to AutoGPT endpoints with hostname parameters containing low-TTL DNS records (TTL=0) resolving to RFC1918 ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) or loopback addresses (127.0.0.0/8, ::1) after initial validation passesWAF mitigation (if patching is not yet possible)
Add this rule to your WAF to block exploitation attempts while you schedule the patch.
Implement DNS response validation rules that enforce minimum TTL thresholds (e.g., minimum 300 seconds) for hostname resolution before allowing request processing; alternatively, cache DNS responses aggressively to prevent re-resolution or block requests targeting RFC1918 and loopback ranges at the network boundaryHow to check if you are affected
- Check AutoGPT version: pip show autogpt-platform | grep Version
- Verify the requests wrapper location: find /usr -name 'request.py' -path '*/autogpt_platform/backend/*' 2>/dev/null
- Search application logs for unusual DNS resolution patterns: grep -i 'dns\|rebind\|resolve' /var/log/autogpt*.log
- Confirm the fix by checking if validate_url() implements recursive DNS rebinding detection: grep -A 10 'def validate_url' /path/to/autogpt/util/request.py
FAQ
What is CVE-2025-31490?
CVE-2025-31490 is a DNS rebinding vulnerability in AutoGPT's request wrapper that allows attackers to bypass SSRF protections by manipulating DNS responses with TTL=0, causing the hostname validation to succeed while the actual request resolves to a restricted internal address.
Is CVE-2025-31490 being actively exploited?
No, CVE-2025-31490 is not currently listed in the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are available, but the vulnerability has clear proof-of-concept feasibility through DNS rebinding techniques.
What versions of AutoGPT are affected by CVE-2025-31490?
All versions of AutoGPT prior to 0.6.1 are vulnerable. The vulnerability exists in the request validation logic found in autogpt_platform/backend/backend/util/request.py.
How do I check if my server is vulnerable to CVE-2025-31490?
Run `pip show autogpt-platform | grep Version` and verify the version is 0.6.1 or later. Versions below 0.6.1 are vulnerable to DNS rebinding attacks through the requests wrapper.
Does Defensia detect CVE-2025-31490?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If AutoGPT is installed on a monitored server, CVE-2025-31490 will appear in your dashboard with remediation steps.
Related Python CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2025-31490. Free for 1 server.
Get started free