{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-3635",
        "assignerOrgId": "ce714d77-add3-4f53-aff5-83d477b104bb",
        "state": "PUBLISHED",
        "assignerShortName": "openjs",
        "dateReserved": "2026-03-06T09:16:35.081Z",
        "datePublished": "2026-03-23T13:53:00.386Z",
        "dateUpdated": "2026-03-23T15:30:10.526Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "ce714d77-add3-4f53-aff5-83d477b104bb",
                "shortName": "openjs",
                "dateUpdated": "2026-03-23T13:53:00.386Z"
            },
            "title": "Fastify request.protocol and request.host spoofable via X-Forwarded-Proto/Host from untrusted connections when trustProxy uses restrictive trust function",
            "problemTypes": [
                {
                    "descriptions": [
                        {
                            "lang": "en",
                            "cweId": "CWE-348",
                            "description": "CWE-348 Use of less trusted source",
                            "type": "CWE"
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "vendor": "fastify",
                    "product": "fastify",
                    "versions": [
                        {
                            "status": "affected",
                            "version": "0",
                            "lessThanOrEqual": "5.8.2",
                            "versionType": "semver"
                        },
                        {
                            "status": "unaffected",
                            "version": "5.8.3",
                            "versionType": "semver"
                        }
                    ],
                    "defaultStatus": "unaffected",
                    "packageURL": "pkg:npm/fastify"
                }
            ],
            "descriptions": [
                {
                    "lang": "en",
                    "value": "Summary\nWhen trustProxy is configured with a restrictive trust function (e.g., a specific IP like trustProxy: '10.0.0.1', a subnet, a hop count, or a custom function), the request.protocol and request.host getters read X-Forwarded-Proto and X-Forwarded-Host headers from any connection — including connections from untrusted IPs. This allows an attacker connecting directly to Fastify (bypassing the proxy) to spoof both the protocol and host seen by the application.\n\nAffected Versions\nfastify <= 5.8.2\n\nImpact\nApplications using request.protocol or request.host for security decisions (HTTPS enforcement, secure cookie flags, CSRF origin checks, URL construction, host-based routing) are affected when trustProxy is configured with a restrictive trust function.\n\nWhen trustProxy: true (trust everything), both host and protocol trust all forwarded headers — this is expected behavior. The vulnerability only manifests with restrictive trust configurations.",
                    "supportingMedia": [
                        {
                            "type": "text/html",
                            "base64": false,
                            "value": "<p><b>Summary</b><br>When trustProxy is configured with a restrictive trust function (e.g., a specific IP like trustProxy: '10.0.0.1', a subnet, a hop count, or a custom function), the request.protocol and request.host getters read X-Forwarded-Proto and X-Forwarded-Host headers from any connection — including connections from untrusted IPs. This allows an attacker connecting directly to Fastify (bypassing the proxy) to spoof both the protocol and host seen by the application.<br><br><b>Affected Versions<br></b>fastify &lt;= 5.8.2<br><br><b>Impact<br></b>Applications using request.protocol or request.host for security decisions (HTTPS enforcement, secure cookie flags, CSRF origin checks, URL construction, host-based routing) are affected when trustProxy is configured with a restrictive trust function.<br><br>When trustProxy: true (trust everything), both host and protocol trust all forwarded headers — this is expected behavior. The vulnerability only manifests with restrictive trust configurations.</p>"
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://github.com/fastify/fastify/security/advisories/GHSA-444r-cwp2-x5xf"
                },
                {
                    "url": "https://www.cve.org/CVERecord?id=CVE-2026-3635"
                },
                {
                    "url": "https://cna.openjsf.org/security-advisories.html"
                }
            ],
            "metrics": [
                {
                    "format": "CVSS",
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "GENERAL"
                        }
                    ],
                    "cvssV3_1": {
                        "version": "3.1",
                        "attackVector": "ADJACENT_NETWORK",
                        "attackComplexity": "HIGH",
                        "privilegesRequired": "NONE",
                        "userInteraction": "NONE",
                        "scope": "CHANGED",
                        "confidentialityImpact": "HIGH",
                        "integrityImpact": "NONE",
                        "availabilityImpact": "NONE",
                        "baseSeverity": "MEDIUM",
                        "baseScore": 6.1,
                        "vectorString": "CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N"
                    }
                }
            ],
            "credits": [
                {
                    "lang": "en",
                    "value": "LetaoZhao (TinkAnet)",
                    "type": "reporter"
                },
                {
                    "lang": "en",
                    "value": "KaKa (climba03003)",
                    "type": "remediation reviewer"
                },
                {
                    "lang": "en",
                    "value": "Matteo Collina",
                    "type": "remediation reviewer"
                },
                {
                    "lang": "en",
                    "value": "Ulises Gascón",
                    "type": "remediation reviewer"
                }
            ],
            "source": {
                "discovery": "UNKNOWN"
            }
        },
        "adp": [
            {
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "timestamp": "2026-03-23T15:29:15.532885Z",
                                "id": "CVE-2026-3635",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "partial"
                                    }
                                ],
                                "role": "CISA Coordinator",
                                "version": "2.0.3"
                            }
                        }
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2026-03-23T15:30:10.526Z"
                }
            }
        ]
    }
}