Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsUpgrade form-data to version 2.5.6, 3.0.5, 4.0.6 or higher.
Affected versions of this package are vulnerable to CRLF Injection via _multiPartHeader and _getContentDisposition in lib/form_data.js, which concatenate the field name and filename option directly into the Content-Disposition header without escaping CR (\r), LF (\n), or ". An attacker who controls the field name or filename passed to FormData#append can embed CRLF sequences and boundary strings to inject additional part headers or smuggle whole extra multipart parts into requests forwarded to a backend server, enabling field injection or override of trusted fields such as is_admin or role.
Note: This is only exploitable when the consuming application passes attacker-controlled data as a field name or filename to FormData#append.
Until upgrading, validate or reject field names and filenames that contain control characters before calling append:
if (/[\r\n]/.test(field)) { throw new Error('invalid field name'); }
const FormData = require('form-data');
const form = new FormData();
form.append('email"\r\nX-Injected: true\r\nfake="', 'user@example.com');
console.log(form.getBuffer().toString());
Before the fix this emits an injected X-Injected: true header line. A field name that also includes --<boundary> sequences can introduce additional parts (e.g. an extra name="is_admin" field), which a downstream parser accepts as legitimate.
Note: No environment (runtime version, OS, or configuration) is stated in the proof-of-concept section.