Skip to content

Commit ddb8104

Browse files
1 parent db4c9dd commit ddb8104

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

advisories/github-reviewed/2025/04/GHSA-mg2h-6x62-wpwc/GHSA-mg2h-6x62-wpwc.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"schema_version": "1.4.0",
33
"id": "GHSA-mg2h-6x62-wpwc",
4-
"modified": "2025-04-18T18:34:35Z",
4+
"modified": "2025-04-18T20:38:47Z",
55
"published": "2025-04-18T15:02:41Z",
66
"aliases": [
77
"CVE-2025-32442"
88
],
99
"summary": "Fastify vulnerable to invalid content-type parsing, which could lead to validation bypass",
10-
"details": "### Impact\n\nIn applications that specify different validation strategies for different content types, it's possible to bypass the validation by providing a _slightly altered_ content type such as with different casing or altered whitespacing before `;`.\n\nUsers using the the following pattern are affected:\n\n```js\nfastify.post('/', {\n handler(request, reply) {\n reply.code(200).send(request.body)\n },\n schema: {\n body: {\n content: {\n 'application/json': {\n schema: {\n type: 'object',\n properties: {\n 'foo': {\n type: 'string',\n }\n },\n required: ['foo']\n }\n },\n }\n }\n }\n})\n```\n\nUser using the following pattern are **not** affected:\n\n```js\nfastify.post('/', {\n handler(request, reply) {\n reply.code(200).send(request.body)\n },\n schema: {\n body: {\n type: 'object',\n properties: {\n 'foo': {\n type: 'string',\n }\n },\n required: ['foo']\n }\n }\n})\n```\n\n### Patches\n_Has the problem been patched? What versions should users upgrade to?_\n\n### Workarounds\n\nDo not specify individual content types in the schema.\n\n### References\n_Are there any links users can visit to find out more?_\n\nhttps://hackerone.com/reports/3087928",
10+
"details": "### Impact\n\nIn applications that specify different validation strategies for different content types, it's possible to bypass the validation by providing a _slightly altered_ content type such as with different casing or altered whitespacing before `;`.\n\nUsers using the the following pattern are affected:\n\n```js\nfastify.post('/', {\n handler(request, reply) {\n reply.code(200).send(request.body)\n },\n schema: {\n body: {\n content: {\n 'application/json': {\n schema: {\n type: 'object',\n properties: {\n 'foo': {\n type: 'string',\n }\n },\n required: ['foo']\n }\n },\n }\n }\n }\n})\n```\n\nUser using the following pattern are **not** affected:\n\n```js\nfastify.post('/', {\n handler(request, reply) {\n reply.code(200).send(request.body)\n },\n schema: {\n body: {\n type: 'object',\n properties: {\n 'foo': {\n type: 'string',\n }\n },\n required: ['foo']\n }\n }\n})\n```\n\n### Patches\n\nThis was patched in v5.3.1, but unfortunately it did not cover all problems. This has been fully patched in v5.3.2.\n\n### Workarounds\n\nDo not specify multiple content types in the schema.\n\n### References\n_Are there any links users can visit to find out more?_\n\nhttps://hackerone.com/reports/3087928",
1111
"severity": [
1212
{
1313
"type": "CVSS_V3",
@@ -28,13 +28,13 @@
2828
"introduced": "5.0.0"
2929
},
3030
{
31-
"fixed": "5.3.1"
31+
"fixed": "5.3.2"
3232
}
3333
]
3434
}
3535
],
3636
"database_specific": {
37-
"last_known_affected_version_range": "<= 5.3.0"
37+
"last_known_affected_version_range": "<= 5.3.1"
3838
}
3939
}
4040
],
@@ -51,6 +51,10 @@
5151
"type": "WEB",
5252
"url": "https://github.com/fastify/fastify/commit/436da4c06dfbbb8c24adee3a64de0c51e4f47418"
5353
},
54+
{
55+
"type": "WEB",
56+
"url": "https://github.com/fastify/fastify/commit/f3d2bcb3963cd570a582e5d39aab01a9ae692fe4"
57+
},
5458
{
5559
"type": "WEB",
5660
"url": "https://hackerone.com/reports/3087928"

0 commit comments

Comments
 (0)