CVE-2007-3205
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedThe parse_str function in (1) PHP, (2) Hardened-PHP, and (3) Suhosin, when called without a second parameter, might allow remote attackers to overwrite arbitrary variables by specifying variable names and values in the string to be parsed. NOTE: it is not clear whether this is a design limitation of the function or a bug in PHP, although it is likely to be regarded as a bug in Hardened-PHP and Suhosin.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceThe parse_str function in PHP, when invoked without a second parameter to capture variables in an array, sets variables directly into the local scope. This allows an attacker who controls the input string to overwrite arbitrary existing variables by specifying variable names and values within the parsed query string.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE dataall versionsall versionsall versionsCVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Authentication
- None
- Confidentiality
- None
- Integrity
- Partial
- Availability
- None
AV:N/AC:L/Au:N/C:N/I:P/A:N
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify PHP installation and versionRun `php -v` or create a file with `<?php phpinfo(); ?>` and access it via a web server to see the installed PHP versionAffected if Any version of PHP is installed (all versions are affected)
-
Locate parse_str function usage in codeSearch PHP source files for instances of `parse_str(` - use commands like `grep -rn "parse_str(" /path/to/code` or similar searching toolsAffected if Code contains parse_str() function calls
-
Check if parse_str lacks the second parameterExamine each parse_str call found and verify whether it includes a second argument to capture variables into an array, e.g., `parse_str($str, $vars)` vs just `parse_str($str)`Affected if Any parse_str() call is used without a second parameter (only has one argument)
-
Determine if parse_str input is user-controlledTrace the input variable passed to parse_str and check if it derives from $_GET, $_POST, $_REQUEST, or other user-supplied data sources without proper validationAffected if The string passed to parse_str originates from untrusted user input and could be manipulated by an attacker
You are affected if your PHP code uses parse_str() without a second parameter to capture variables, and the input to that function can be controlled by an attacker who could then overwrite existing variables in the local scope.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
From vendor dataAlways call parse_str() with a second parameter (e.g., parse_str($str, $vars)) to store parsed variables in an array rather than the local scope. Additionally, validate and sanitize all input before passing to parse_str.
- Consultation3.0 h
- Implementation4.0 h
- Testing2.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,168.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2007-3205 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2007-3205 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data