{
    "CVE_data_meta": {
        "ASSIGNER": "security-advisories@github.com",
        "ID": "CVE-2022-35948",
        "STATE": "PUBLIC",
        "TITLE": "CRLF Injection in Nodejs \u2018undici\u2019 via Content-Type"
    },
    "affects": {
        "vendor": {
            "vendor_data": [
                {
                    "product": {
                        "product_data": [
                            {
                                "product_name": "undici",
                                "version": {
                                    "version_data": [
                                        {
                                            "version_value": "=< 5.8.0"
                                        }
                                    ]
                                }
                            }
                        ]
                    },
                    "vendor_name": "nodejs"
                }
            ]
        }
    },
    "data_format": "MITRE",
    "data_type": "CVE",
    "data_version": "4.0",
    "description": {
        "description_data": [
            {
                "lang": "eng",
                "value": "undici is an HTTP/1.1 client, written from scratch for Node.js.`=< undici@5.8.0` users are vulnerable to _CRLF Injection_ on headers when using unsanitized input as request headers, more specifically, inside the `content-type` header. Example: ``` import { request } from 'undici' const unsanitizedContentTypeInput = 'application/json\\r\\n\\r\\nGET /foo2 HTTP/1.1' await request('http://localhost:3000, { method: 'GET', headers: { 'content-type': unsanitizedContentTypeInput }, }) ``` The above snippet will perform two requests in a single `request` API call: 1) `http://localhost:3000/` 2) `http://localhost:3000/foo2` This issue was patched in Undici v5.8.1. Sanitize input when sending content-type headers using user input as a workaround."
            }
        ]
    },
    "impact": {
        "cvss": {
            "attackComplexity": "HIGH",
            "attackVector": "NETWORK",
            "availabilityImpact": "HIGH",
            "baseScore": 7.1,
            "baseSeverity": "HIGH",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "LOW",
            "privilegesRequired": "LOW",
            "scope": "UNCHANGED",
            "userInteraction": "NONE",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N",
            "version": "3.1"
        }
    },
    "problemtype": {
        "problemtype_data": [
            {
                "description": [
                    {
                        "lang": "eng",
                        "value": "CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection')"
                    }
                ]
            },
            {
                "description": [
                    {
                        "lang": "eng",
                        "value": "CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')"
                    }
                ]
            }
        ]
    },
    "references": {
        "reference_data": [
            {
                "name": "https://github.com/nodejs/undici/releases/tag/v5.8.2",
                "refsource": "MISC",
                "url": "https://github.com/nodejs/undici/releases/tag/v5.8.2"
            },
            {
                "name": "https://github.com/nodejs/undici/security/advisories/GHSA-f772-66g8-q5h3",
                "refsource": "CONFIRM",
                "url": "https://github.com/nodejs/undici/security/advisories/GHSA-f772-66g8-q5h3"
            },
            {
                "name": "https://github.com/nodejs/undici/commit/66165d604fd0aee70a93ed5c44ad4cc2df395f80",
                "refsource": "MISC",
                "url": "https://github.com/nodejs/undici/commit/66165d604fd0aee70a93ed5c44ad4cc2df395f80"
            }
        ]
    },
    "source": {
        "advisory": "GHSA-f772-66g8-q5h3",
        "discovery": "UNKNOWN"
    }
}