Fix CVE-2024-46256 and CVE-2024-46257

- Schema validate against bad domain characters
- Integration test for CVE POC examples
- Cypress rewrite of plugins for file upload
This commit is contained in:
Jamie Curnow
2024-10-11 11:21:22 +10:00
parent 7c97516de6
commit c39d5433bc
19 changed files with 358 additions and 180 deletions

View File

@ -76,7 +76,7 @@
"uniqueItems": true,
"items": {
"type": "string",
"pattern": "^(?:\\*\\.)?(?:[^.*]+\\.?)+[^.]$"
"pattern": "^[^&| @!#%^();:/\\\\}{=+?<>,~`'\"]+$"
}
},
"enabled": {

View File

@ -0,0 +1,9 @@
{
"type": "object",
"description": "Error",
"properties": {
"error": {
"$ref": "./error-object.json"
}
}
}

View File

@ -72,6 +72,26 @@
}
}
}
},
"400": {
"description": "400 response",
"content": {
"application/json": {
"examples": {
"default": {
"value": {
"error": {
"code": 400,
"message": "Domains are invalid"
}
}
}
},
"schema": {
"$ref": "../../../components/error.json"
}
}
}
}
}
}

View File

@ -50,6 +50,42 @@
"certificate_key": true
}
}
},
"schema": {
"type": "object",
"additionalProperties": false,
"required": ["certificate", "certificate_key"],
"properties": {
"certificate": {
"type": "object",
"additionalProperties": false,
"required": ["cn", "issuer", "dates"],
"properties": {
"cn": {
"type": "string"
},
"issuer": {
"type": "string"
},
"dates": {
"type": "object",
"additionalProperties": false,
"required": ["from", "to"],
"properties": {
"from": {
"type": "integer"
},
"to": {
"type": "integer"
}
}
}
}
},
"certificate_key": {
"type": "boolean"
}
}
}
}
}
@ -67,6 +103,9 @@
}
}
}
},
"schema": {
"$ref": "../../../../components/error.json"
}
}
}

View File

@ -50,7 +50,7 @@
}
},
"schema": {
"$ref": "../../../../../components/error-object.json"
"$ref": "../../../../../components/error.json"
}
}
}

View File

@ -50,7 +50,7 @@
}
},
"schema": {
"$ref": "../../../../../components/error-object.json"
"$ref": "../../../../../components/error.json"
}
}
}

View File

@ -50,7 +50,7 @@
}
},
"schema": {
"$ref": "../../../../../components/error-object.json"
"$ref": "../../../../../components/error.json"
}
}
}

View File

@ -50,7 +50,7 @@
}
},
"schema": {
"$ref": "../../../../../components/error-object.json"
"$ref": "../../../../../components/error.json"
}
}
}

View File

@ -50,7 +50,7 @@
}
},
"schema": {
"$ref": "../../../../../components/error-object.json"
"$ref": "../../../../../components/error.json"
}
}
}

View File

@ -50,7 +50,7 @@
}
},
"schema": {
"$ref": "../../../../../components/error-object.json"
"$ref": "../../../../../components/error.json"
}
}
}

View File

@ -50,7 +50,7 @@
}
},
"schema": {
"$ref": "../../../../../components/error-object.json"
"$ref": "../../../../../components/error.json"
}
}
}

View File

@ -50,7 +50,7 @@
}
},
"schema": {
"$ref": "../../../../../components/error-object.json"
"$ref": "../../../../../components/error.json"
}
}
}