CVE-2026-77972: CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition in Slab safeurl
CVE-2026-77972 is a critical Time-of-check Time-of-use (TOCTOU) race condition vulnerability in the Slab safeurl library affecting versions from 0.1.0 onward. The flaw allows an attacker controlling DNS responses for a hostname to bypass validation checks and reach internal network destinations that should be blocked. This occurs because validation returns only a verdict without the approved address, causing HTTP clients to resolve the hostname again at request time. An attacker can manipulate DNS responses between these lookups to redirect requests to unauthorized addresses. This issue also arises naturally when DNS records change between lookups due to short TTLs or address rotation.
AI Analysis
Technical Summary
The vulnerability in Slab safeurl stems from a TOCTOU race condition where the validation step approves a hostname based on one DNS resolution, but the HTTP client performs a second DNS resolution when making the request. Since the validation does not return the approved IP address, an attacker controlling the authoritative DNS can respond with an allowed IP during validation and a blocked IP during the request, causing the client to connect to an unauthorized destination. This affects all versions of safeurl from 0.1.0 onward. The issue also occurs in benign scenarios where DNS addresses legitimately change between lookups.
Potential Impact
An attacker who controls DNS responses for a hostname can bypass safeurl's validation and cause HTTP clients to connect to internal or otherwise restricted network destinations that should have been blocked. This undermines the security guarantees of the safeurl library, potentially exposing internal services or sensitive resources. The vulnerability has a critical severity with a CVSS 4.0 score of 9, indicating high impact with network attack vector, high complexity, and significant confidentiality and security impacts.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, users should be aware of the risk of TOCTOU race conditions in DNS resolution and consider mitigating by avoiding reliance on safeurl for critical hostname validation or implementing additional controls to ensure DNS resolution consistency between validation and use.
CVE-2026-77972: CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition in Slab safeurl
Description
CVE-2026-77972 is a critical Time-of-check Time-of-use (TOCTOU) race condition vulnerability in the Slab safeurl library affecting versions from 0.1.0 onward. The flaw allows an attacker controlling DNS responses for a hostname to bypass validation checks and reach internal network destinations that should be blocked. This occurs because validation returns only a verdict without the approved address, causing HTTP clients to resolve the hostname again at request time. An attacker can manipulate DNS responses between these lookups to redirect requests to unauthorized addresses. This issue also arises naturally when DNS records change between lookups due to short TTLs or address rotation.
CVSS v4.0
Score 9.0critical
Affected software
Slab
safeurl
Slab
safeurl
cpe:2.3:a:slab:safeurl:*:*:*:*:*:*:*:*Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in Slab safeurl stems from a TOCTOU race condition where the validation step approves a hostname based on one DNS resolution, but the HTTP client performs a second DNS resolution when making the request. Since the validation does not return the approved IP address, an attacker controlling the authoritative DNS can respond with an allowed IP during validation and a blocked IP during the request, causing the client to connect to an unauthorized destination. This affects all versions of safeurl from 0.1.0 onward. The issue also occurs in benign scenarios where DNS addresses legitimately change between lookups.
Potential Impact
An attacker who controls DNS responses for a hostname can bypass safeurl's validation and cause HTTP clients to connect to internal or otherwise restricted network destinations that should have been blocked. This undermines the security guarantees of the safeurl library, potentially exposing internal services or sensitive resources. The vulnerability has a critical severity with a CVSS 4.0 score of 9, indicating high impact with network attack vector, high complexity, and significant confidentiality and security impacts.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, users should be aware of the risk of TOCTOU race conditions in DNS resolution and consider mitigating by avoiding reliance on safeurl for critical hostname validation or implementing additional controls to ensure DNS resolution consistency between validation and use.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- EEF
- Date Reserved
- 2026-08-24T15:45:02.127Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6aa9688d55bf5e2cf5074e5f
Added to database: 09/15/2026, 15:47:25 UTC
Last enriched: 09/15/2026, 16:01:30 UTC
Last updated: 09/15/2026, 16:01:30 UTC
Views: 7
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.