{"id":"GHSA-43w5-mmxv-cpvh","summary":"Micronaut vulnerable to DoS via crafted form-urlencoded body binding with descending array indices","details":"In `JsonBeanPropertyBinder::expandArrayToThreshold` in `io.micronaut:micronaut-json-core` before Micronaut 4 4.10.16 and in Micronaut 3 before 3.10.5 does not correctly handle descending array index order during form-urlencoded body binding, which allows remote attackers to cause a denial of service (non-terminating loop, CPU exhaustion, and OutOfMemoryError) via crafted indexed form parameters (e.g., `authors[1].name` followed by `authors[0].name`).\n\n### Example\n\nWith such an application\n\n```java\npackage dosform;\n\nimport io.micronaut.http.HttpResponse;\nimport io.micronaut.http.MediaType;\nimport io.micronaut.http.annotation.Body;\nimport io.micronaut.http.annotation.Consumes;\nimport io.micronaut.http.annotation.Controller;\nimport io.micronaut.http.annotation.Get;\nimport io.micronaut.http.annotation.Post;\nimport io.micronaut.http.annotation.Produces;\n\nimport java.net.URI;\n\n@Controller\nclass HomeController {\n\n    @Produces(MediaType.TEXT_HTML)\n    @Get\n    String index() {\n        return \"\"\"\n                \u003c!DOCTYPE html\u003e\n                \u003chtml\u003e\n                \u003chead\u003e\n                \u003ctitle\u003e\u003c/title\u003e\n                \u003c/head\u003e\n                \u003cbody\u003e\n    \u003cform action=\"/submit\" method=\"post\"\u003e\n      \u003clabel for=\"firstAuthor\"\u003eFist Author\u003c/label\u003e\n      \u003cinput id=\"firstAuthor\" name=\"authors[0].name\" type=\"text\"/\u003e\n\n      \u003clabel for=\"secondAuthor\"\u003eSecond Author\u003c/label\u003e\n      \u003cinput id=\"secondAuthor\" name=\"authors[1].name\" type=\"text\"/\u003e\n      \n      \u003clabel for=\"thirdAuthor\"\u003eThird Author\u003c/label\u003e\n      \u003cinput id=\"thirdAuthor\" name=\"authors[2].name\" type=\"text\"/\u003e\n\n      \u003cbutton type=\"submit\"\u003eSubmit\u003c/button\u003e\n    \u003c/form\u003e\n               \n                \u003c/body\u003e\n                \u003c/html\u003e\n                \"\"\";\n    }\n\n    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)\n    @Post(\"/submit\")\n    HttpResponse\u003c?\u003e submit(@Body Book book) {\n        return HttpResponse.seeOther(URI.create(\"/\"));\n    }\n}\npackage dosform;\n\nimport io.micronaut.core.annotation.Introspected;\n\nimport java.util.Objects;\n\n@Introspected\npublic class Author {\n    private String name;\n    public String getName() { return name; }\n    public void setName(String name) { this.name = name; }\n\n    @Override\n    public final boolean equals(Object o) {\n        if (!(o instanceof Author)) return false;\n\n        Author author = (Author) o;\n        return Objects.equals(name, author.name);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hashCode(name);\n    }\n\n    @Override\n    public String toString() {\n        return \"Author{\" +\n                \"name='\" + name + '\\'' +\n                '}';\n    }\n}\npackage dosform;\n\nimport io.micronaut.core.annotation.Introspected;\n\nimport java.util.List;\nimport java.util.Objects;\n\n@Introspected\npublic class Book {\n    private List\u003cAuthor\u003e authors;\n    public List\u003cAuthor\u003e getAuthors() { return authors; }\n    public void setAuthors(List\u003cAuthor\u003e authors) { this.authors = authors; }\n\n    @Override\n    public final boolean equals(Object o) {\n        if (!(o instanceof Book)) return false;\n\n        Book book = (Book) o;\n        return Objects.equals(authors, book.authors);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hashCode(authors);\n    }\n\n    @Override\n    public String toString() {\n        return \"Book{\" +\n                \"authors=\" + authors +\n                '}';\n    }\n}\n```\n\nSending `curl -v -X POST 'http://127.0.0.1:8080/submit' -H 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'authors[1].name=RobertGalbraith' --data-urlencode 'authors[0].name=JKRowling'` causes sustained CPU usage and unbounded memory growth (eventually `OutOfMemoryError`). \n\n### Patches\nFor Micronaut 4, the problem has been patched in `micronaut-core`, dependencies with group id `io.micronaut`, since [4.10.16](https://github.com/micronaut-projects/micronaut-core/releases/tag/v4.10.16).\n\nFor Micronaut 3, the problem has been patched since [3.10.5](https://github.com/micronaut-projects/micronaut-core/releases/tag/v3.10.5)\n\nUsers upgrade to the latest version of the framework. \n\n### Workarounds\nThere is no way for users to fix or remediate the vulnerability without upgrading.\n\n### References\nPR Fix: https://github.com/micronaut-projects/micronaut-core/pull/12410","aliases":["CVE-2026-33013"],"modified":"2026-07-17T21:04:43.565574024Z","published":"2026-03-17T16:59:59Z","database_specific":{"github_reviewed_at":"2026-03-17T16:59:59Z","nvd_published_at":"2026-03-20T05:16:15Z","cwe_ids":["CWE-835"],"severity":"HIGH","github_reviewed":true},"references":[{"type":"WEB","url":"https://github.com/micronaut-projects/micronaut-core/security/advisories/GHSA-43w5-mmxv-cpvh"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33013"},{"type":"WEB","url":"https://github.com/micronaut-projects/micronaut-core/pull/12410"},{"type":"WEB","url":"https://github.com/micronaut-projects/micronaut-core/commit/1afe509677c51b320041b7a2c177366d4a4deb55"},{"type":"PACKAGE","url":"https://github.com/micronaut-projects/micronaut-core"},{"type":"WEB","url":"https://github.com/micronaut-projects/micronaut-core/releases/tag/v3.10.5"},{"type":"WEB","url":"https://github.com/micronaut-projects/micronaut-core/releases/tag/v4.10.16"}],"affected":[{"package":{"name":"io.micronaut:micronaut-json-core","ecosystem":"Maven","purl":"pkg:maven/io.micronaut/micronaut-json-core"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.0-M1"},{"fixed":"4.10.16"}]}],"versions":["4.0.0","4.0.0-M1","4.0.0-M2","4.0.0-M3","4.0.0-M4","4.0.0-M5","4.0.0-M6","4.0.0-M7","4.0.0-RC1","4.0.0-RC2","4.0.0-RC3","4.0.0-RC4","4.0.0-RC5","4.0.1","4.0.2","4.0.3","4.0.4","4.0.5","4.0.6","4.0.7","4.1.0","4.1.1","4.1.10","4.1.11","4.1.12","4.1.2","4.1.3","4.1.4","4.1.5","4.1.6","4.1.7","4.1.8","4.1.9","4.10.0","4.10.1","4.10.10","4.10.11","4.10.12","4.10.13","4.10.14","4.10.15","4.10.2","4.10.3","4.10.4","4.10.5","4.10.6","4.10.7","4.10.8","4.10.9","4.2.0","4.2.1","4.2.2","4.2.3","4.2.4","4.3.0","4.3.1","4.3.10","4.3.11","4.3.12","4.3.13","4.3.14","4.3.15","4.3.16","4.3.17","4.3.2","4.3.3","4.3.4","4.3.5","4.3.6","4.3.7","4.3.8","4.3.9","4.4.0","4.4.1","4.4.10","4.4.2","4.4.3","4.4.4","4.4.5","4.4.6","4.4.7","4.4.8","4.4.9","4.5.0","4.5.1","4.5.2","4.5.3","4.5.4","4.6.0","4.6.1","4.6.2","4.6.3","4.6.4","4.6.5","4.6.6","4.6.7","4.6.8","4.7.0","4.7.1","4.7.10","4.7.11","4.7.12","4.7.13","4.7.14","4.7.15","4.7.16","4.7.17","4.7.18","4.7.19","4.7.2","4.7.20","4.7.21","4.7.22","4.7.23","4.7.24","4.7.25","4.7.26","4.7.27","4.7.3","4.7.4","4.7.5","4.7.6","4.7.7","4.7.8","4.7.9","4.8.0","4.8.1","4.8.10","4.8.11","4.8.12","4.8.13","4.8.14","4.8.15","4.8.16","4.8.17","4.8.18","4.8.19","4.8.2","4.8.3","4.8.4","4.8.5","4.8.6","4.8.7","4.8.8","4.8.9","4.9.0","4.9.1","4.9.10","4.9.11","4.9.12","4.9.2","4.9.3","4.9.4","4.9.5","4.9.6","4.9.7","4.9.8","4.9.9"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-43w5-mmxv-cpvh/GHSA-43w5-mmxv-cpvh.json"}},{"package":{"name":"io.micronaut:micronaut-json-core","ecosystem":"Maven","purl":"pkg:maven/io.micronaut/micronaut-json-core"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.9.0"},{"fixed":"3.10.5"}]}],"versions":["3.10.0","3.10.1","3.10.2","3.10.3","3.10.4","3.9.0","3.9.1","3.9.2","3.9.3","3.9.4","3.9.5","3.9.6","3.9.7"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-43w5-mmxv-cpvh/GHSA-43w5-mmxv-cpvh.json"}},{"package":{"name":"io.micronaut:micronaut-json-core","ecosystem":"Maven","purl":"pkg:maven/io.micronaut/micronaut-json-core"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.8.13"}]}],"versions":["3.1.0","3.1.1","3.1.2","3.1.3","3.1.4","3.2.0","3.2.1","3.2.2","3.2.3","3.2.4","3.2.5","3.2.6","3.2.7","3.3.0","3.3.0-M1","3.3.1","3.3.2","3.3.3","3.3.4","3.4.0","3.4.1","3.4.2","3.4.3","3.4.4","3.5.0","3.5.1","3.5.2","3.5.3","3.5.4","3.5.5","3.5.6","3.5.7","3.6.0","3.6.1","3.6.2","3.6.3","3.6.4","3.6.5","3.6.6","3.7.0","3.7.1","3.7.2","3.7.3","3.7.4","3.7.5","3.7.6","3.7.7","3.8.0","3.8.1","3.8.10","3.8.11","3.8.12","3.8.2","3.8.3","3.8.4","3.8.5","3.8.6","3.8.7","3.8.8","3.8.9"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-43w5-mmxv-cpvh/GHSA-43w5-mmxv-cpvh.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"}]}