CVE-2025-40927
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 · uneditedCGI::Simple versions before 1.282 for Perl has a HTTP response splitting flaw This vulnerability is a confirmed HTTP response splitting flaw in CGI::Simple that allows HTTP response header injection, which can be used for reflected XSS or open redirect under certain conditions. Although some validation exists, it can be bypassed using URL-encoded values, allowing an attacker to inject untrusted content into the response via query parameters. As a result, an attacker can inject a line break (e.g. %0A) into the parameter value, causing the server to split the HTTP response and inject arbitrary headers or even an HTML/JavaScript body, leading to reflected cross-site scripting (XSS), open redirect or other attacks. The issue documented in CVE-2010-4410 https://www.cve.org/CVERecord?id=CVE-2010-4410 is related but the fix was incomplete. Impact By injecting %0A (newline) into a query string parameter, an attacker can: * Break the current HTTP header * Inject a new header or entire body * Deliver a script payload that is reflected in the server’s response That can lead to the following attacks: * reflected XSS * open redirect * cache poisoning * header manipulation
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 confidenceHTTP response splitting vulnerability in CGI::Simple before version 1.282 allows attackers to inject newline characters (%0A) via URL-encoded query parameters, breaking HTTP headers and enabling injection of arbitrary headers or body content. This enables reflected XSS, open redirects, cache poisoning, and header manipulation.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
CVSS 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
- Privileges
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- Low
- Integrity
- Low
- Availability
- Low
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
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 CGI::Simple version in useRun `perl -MCGI::Simple -e 'print $CGI::Simple::VERSION'` or check your project's dependency file (cpanfile, Makefile.PL, or similar) for the CGI::Simple versionAffected if The version is lower than 1.282 (e.g., 1.281, 1.27, etc.)
-
Confirm application processes URL query parametersInspect application code to see if it reads and uses query parameters (via $cgi->param() or similar) in any HTTP response header generation such as redirects, cookies, or custom headersAffected if Query parameters are directly used in header generation without sanitization
-
Check for input validation on newlinesSearch code for any filtering or validation of %0A, %0D, or literal newline characters in parameters before using them in headersAffected if No validation exists for newline characters in user-supplied parameters before header output
-
Test for header injection via query parametersSubmit a request with %0A followed by arbitrary header content (e.g., `?param=value%0ASet-Cookie:malicious=test`) and observe if the response includes the injected headerAffected if The application reflects newline characters in headers, allowing HTTP response splitting
-
Identify if application uses CGI::Simple for HTTP header generationReview code to confirm CGI::Simple methods (such as redirect(), header()) are called with unsanitized user inputAffected if CGI::Simple header methods are called with raw query parameter values without sanitizing newlines
You are affected if CGI::Simple version is below 1.282 AND your application uses query parameters in HTTP header generation without stripping newline characters (%0A, %0D).
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.
dbcve · scopedUpgrade CGI::Simple to version 1.282 or later to apply the complete fix. Validate and sanitize all user-supplied input before using it in HTTP headers.
CGI::Simple version 1.282
- Check current CGI::Simple version by running 'perl -MCGI::Simple -e 'print $CGI::Simple::VERSION;'
- Upgrade CGI::Simple to version 1.282 or later using your Perl package manager (e.g., 'cpan CGI::Simple' or 'cpanm CGI::Simple')
- Verify the upgrade was successful by checking the installed version
- Test your application to ensure functionality is intact
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation3.0 h
- Implementation2.0 h
- Testing3.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 $2,832.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2025-40927 — 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-2025-40927 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