Vulnerability record · CVE-2007-0042 · published 10 July 2007
CVE-2007-0042: ASP.NET Null Byte Termination Flaw Exposes Configuration Files
Microsoft · .Net Framework
ASP.NET in Microsoft .NET Framework 1.0, 1.1, and 2.0 mishandles %00 characters because POSIX functions treat them as string terminators while .NET strings treat them as data. This interpretation conflict lets remote attackers read configuration files and obtain sensitive information, and may bypass security checks that constrain the final substring of a string.
Description
Interpretation conflict in ASP.NET in Microsoft .NET Framework 1.0, 1.1, and 2.0 for Windows 2000, XP, Server 2003, and Vista allows remote attackers to access configuration files and obtain sensitive information, and possibly bypass security mechanisms that try to constrain the final substring of a string, via %00 characters, related to use of %00 as a string terminator within POSIX functions but a data character within .NET strings, aka "Null Byte Termination Vulnerability."
AV:N/AC:L/Au:N/C:C/I:N/A:N
Automated analysis
high priorityThe flaw allows unauthenticated remote information disclosure of configuration files, and EPSS is at the 99.5th percentile, though no KEV listing or confirmed in-the-wild exploitation is documented.
What it is
ASP.NET in Microsoft .NET Framework 1.0, 1.1, and 2.0 mishandles %00 characters because POSIX functions treat them as string terminators while .NET strings treat them as data. This interpretation conflict lets remote attackers read configuration files and obtain sensitive information, and may bypass security checks that constrain the final substring of a string.
Impact
An attacker can retrieve sensitive configuration files and other protected content, exposing credentials, connection strings, and application secrets. The flaw may also defeat input-validation or path-restriction logic that relies on substring checks.
Attack surface
Reachable remotely over the network against ASP.NET applications, with no authentication or user interaction required per the CVSS vector AV:N/AC:L/Au:N. The attacker supplies crafted input containing %00 characters to a request handled by the affected framework.
Exploitation
Not listed in CISA KEV and no ransomware associations are documented, but EPSS is very high at 0.76151 (99.5th percentile), indicating substantial predicted exploitation activity. References are vendor and government advisories plus a third-party advisory, with no public exploit tag supplied.
What to do
- Apply Microsoft security bulletin MS07-040 for .NET Framework 1.0, 1.1, and 2.0 on affected Windows versions.
- Upgrade applications off the unsupported .NET Framework 1.0/1.1/2.0 runtimes to a currently supported release.
- Reject or normalize %00 and other encoded null bytes in all request input at the web server and application layer.
- Do not rely on substring or suffix checks for path and file access control; validate canonicalized paths against an allowlist.
- Restrict filesystem permissions so web application processes cannot read configuration files outside their required scope.
Detection
- Search web server and application logs for requests containing %00, %2500, or raw null bytes in URLs, query strings, or form fields.
- Alert on access to web.config, machine.config, or other configuration file paths from external clients.
- Monitor for anomalous reads of configuration or sensitive files by the ASP.NET worker process.
- Review WAF and proxy logs for encoded null byte patterns that bypass path or extension filtering.
This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.
Affected products
1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
Track CVE-2007-0042 inside VULONE
Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.
Related vulnerabilities
Same products first, then exploited flaws of the same weakness class.
Source: NIST National Vulnerability Database (record CVE-2007-0042), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.