CVE-2022-41919

Source
https://cve.org/CVERecord?id=CVE-2022-41919
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-41919.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-41919
Aliases
Published
2022-11-22T00:00:00Z
Modified
2025-12-04T10:37:48.292094Z
Severity
  • 4.2 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N CVSS Calculator
Summary
Fastify vulnerable to Cross-Site Request Forgery (CSRF) attack via incorrect content type
Details

Fastify is a web framework with minimal overhead and plugin architecture. The attacker can use the incorrect Content-Type to bypass the Pre-Flight checking of fetch. fetch() requests with Content-Type’s essence as "application/x-www-form-urlencoded", "multipart/form-data", or "text/plain", could potentially be used to invoke routes that only accepts application/json content type, thus bypassing any CORS protection, and therefore they could lead to a Cross-Site Request Forgery attack. This issue has been patched in version 4.10.2 and 3.29.4. As a workaround, implement Cross-Site Request Forgery protection using `@fastify/csrf'.

Database specific
{
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
        "CWE-352"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/41xxx/CVE-2022-41919.json"
}
References

Affected packages

Git / github.com/fastify/fastify

Affected ranges

Type
GIT
Repo
https://github.com/fastify/fastify
Events
Database specific
{
    "versions": [
        {
            "introduced": "4.0.0"
        },
        {
            "fixed": "4.10.2"
        }
    ]
}
Type
GIT
Repo
https://github.com/fastify/fastify
Events
Database specific
{
    "versions": [
        {
            "introduced": "3.0.0"
        },
        {
            "fixed": "3.29.4"
        }
    ]
}

Affected versions

v3.*
v3.0.0
v3.0.1
v3.0.2
v3.0.3
v3.1.0
v3.1.1
v3.10.0
v3.10.1
v3.11.0
v3.12.0
v3.13.0
v3.14.0
v3.14.1
v3.14.2
v3.15.0
v3.15.1
v3.16.0
v3.16.1
v3.16.2
v3.17.0
v3.18.0
v3.18.1
v3.19.0
v3.19.1
v3.19.2
v3.2.0
v3.2.1
v3.20.0
v3.20.1
v3.20.2
v3.21.0
v3.21.1
v3.21.2
v3.21.3
v3.21.4
v3.21.5
v3.21.6
v3.22.0
v3.22.1
v3.23.0
v3.23.1
v3.24.0
v3.24.1
v3.25.0
v3.25.1
v3.25.2
v3.25.3
v3.26.0
v3.27.0
v3.27.1
v3.27.2
v3.27.3
v3.27.4
v3.28.0
v3.29.0
v3.29.1
v3.29.2
v3.29.3
v3.3.0
v3.4.0
v3.4.1
v3.5.0
v3.5.1
v3.6.0
v3.7.0
v3.8.0
v3.9.0
v3.9.1
v3.9.2
v4.*
v4.0.0
v4.0.1
v4.0.2
v4.0.3
v4.1.0
v4.10.0
v4.10.1
v4.2.0
v4.2.1
v4.3.0
v4.4.0
v4.5.0
v4.5.1
v4.5.2
v4.5.3
v4.6.0
v4.7.0
v4.8.0
v4.8.1
v4.9.0
v4.9.1
v4.9.2

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-41919.json"