{"id":"CVE-2022-24863","aliases":["EUVD-2022-1868","GHSA-49w7-5r33-jm9m","GHSA-xg75-q3q5-cqmv","GO-2022-0427"],"status":"published","title":"Denial of service in http-swagger","description":"http-swagger is an open source wrapper to automatically generate RESTful API documentation with Swagger 2.0. In versions of http-swagger prior to 1.2.6 an attacker may perform a denial of service attack consisting of memory exhaustion on the host system. The cause of the memory exhaustion is down to improper handling of http methods. Users are advised to upgrade. Users unable to upgrade may to restrict the path prefix to the \"GET\" method as a workaround.","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.0244,"percentile":0.84434,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-400","CWE-755","CWE-79"],"published":"2022-04-18T19:00:22Z","modified":"2026-10-28T02:31:13Z","fixes":[{"ecosystem":"Go","package":"github.com/swaggo/http-swagger","fixed_in":["1.2.6"],"sources":["ghsa"]}],"affected":[{"source":"ghsa","ecosystem":"Go","package":"github.com/swaggo/http-swagger","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.6"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/swaggo/http-swagger","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.2.6"}]}],"bundled":2},{"source":"osv","ecosystem":"Go","package":"github.com/swaggo/http-swagger","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.2.6"}]}],"bundled":2},{"source":"osv","ecosystem":"Go","package":"github.com/swaggo/http-swagger","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.2.6"}]}],"bundled":2}],"products":[{"vendor":"http-swagger_project","product":"http-swagger"},{"vendor":"swaggo","product":"http-swagger"}],"references":[{"url":"https://github.com/swaggo/http-swagger/security/advisories/GHSA-xg75-q3q5-cqmv","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/swaggo/http-swagger/pull/62","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","fix","web"]},{"url":"https://github.com/swaggo/http-swagger/commit/b7d83e8fba85a7a51aa7e45e8244b4173f15049e","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/swaggo/http-swagger/releases/tag/v1.2.6","tags":["x_refsource_MISC","x_transferred","Release Notes","Third Party Advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24863","tags":["advisory"]},{"url":"https://cosmosofcyberspace.github.io/improper_http_method_leads_to_xss/poc.html","tags":["web"]},{"url":"https://github.com/advisories/GHSA-xg75-q3q5-cqmv"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/24xxx/CVE-2022-24863.json","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/25xxx/CVE-2024-25712.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-25712","tags":["advisory"]},{"url":"https://github.com/swaggo/http-swagger","tags":["package"]},{"url":"https://github.com/swaggo/http-swagger/issues/61","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2022-24863","title":"Denial of service in http-swagger","description":"http-swagger is an open source wrapper to automatically generate RESTful API documentation with Swagger 2.0. In versions of http-swagger prior to 1.2.6 an attacker may perform a denial of service attack consisting of memory exhaustion on the host system. The cause of the memory exhaustion is down to improper handling of http methods. Users are advised to upgrade. Users unable to upgrade may to restrict the path prefix to the \"GET\" method as a workaround.","status":"published","published":"2022-04-18T19:00:22Z","modified":"2025-04-23T18:34:13.994Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-400"],"updated_at":"2026-11-02T14:34:34.576287Z"}],"euvd":[{"id":"EUVD-2022-1868","description":"http-swagger is an open source wrapper to automatically generate RESTful API documentation with Swagger 2.0. In versions of http-swagger prior to 1.2.6 an attacker may perform a denial of service attack consisting of memory exhaustion on the host system. The cause of the memory exhaustion is down to improper handling of http methods. Users are advised to upgrade. Users unable to upgrade may to restrict the path prefix to the \"GET\" method as a workaround.","status":"published","published":"2022-04-18T19:00:22Z","modified":"2025-04-23T18:34:13Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T20:52:08.401317Z"}],"ghsa":[{"id":"GHSA-xg75-q3q5-cqmv","title":"Denial of Service in http-swagger","description":"### Impact\nAllows an attacker to perform a DOS attack consisting of memory exhaustion on the host system.\n\n### Patches\nYes. Please upgrade to v1.2.6.\n\n### Workarounds\nA workaround is to restrict the path prefix to the \"GET\" method. As shown below\n```\nfunc main() {\n\tr := mux.NewRouter()\n\n\tr.PathPrefix(\"/swagger/\").Handler(httpSwagger.Handler(\n\t\thttpSwagger.URL(\"http://localhost:1323/swagger/doc.json\"), //The url pointing to API definition\n\t\thttpSwagger.DeepLinking(true),\n\t\thttpSwagger.DocExpansion(\"none\"),\n\t\thttpSwagger.DomID(\"#swagger-ui\"),\n\t)).Methods(http.MethodGet)\n```\n\n### References\nReporter dongguangli from https://www.huoxian.cn/ company\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [http-swagger](https://github.com/swaggo/http-swagger/issues)\n\n","status":"published","published":"2022-04-22T20:55:52Z","modified":"2024-03-04T18:35:28Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-400","CWE-755"],"updated_at":"2026-11-02T14:37:39.730152Z"}],"nvd":[{"id":"CVE-2022-24863","description":"http-swagger is an open source wrapper to automatically generate RESTful API documentation with Swagger 2.0. In versions of http-swagger prior to 1.2.6 an attacker may perform a denial of service attack consisting of memory exhaustion on the host system. The cause of the memory exhaustion is down to improper handling of http methods. Users are advised to upgrade. Users unable to upgrade may to restrict the path prefix to the \"GET\" method as a workaround.","status":"published","published":"2022-04-18T19:15:09.837Z","modified":"2026-06-17T04:32:41.12Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"secondary"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":7.8,"vector":"AV:N/AC:L/Au:N/C:N/I:N/A:C","level":"high","assessor":"primary"}],"cwes":["CWE-400","CWE-755"],"updated_at":"2026-11-02T14:07:16.9948Z"}],"osv":[{"id":"CVE-2022-24863","title":"Denial of service in http-swagger","description":"http-swagger is an open source wrapper to automatically generate RESTful API documentation with Swagger 2.0. In versions of http-swagger prior to 1.2.6 an attacker may perform a denial of service attack consisting of memory exhaustion on the host system. The cause of the memory exhaustion is down to improper handling of http methods. Users are advised to upgrade. Users unable to upgrade may to restrict the path prefix to the \"GET\" method as a workaround.","status":"published","published":"2022-04-18T19:00:22Z","modified":"2026-10-28T02:31:13.311818214Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-400"],"updated_at":"2026-11-02T15:44:24.428403Z"},{"id":"CVE-2024-25712","description":"http-swagger before 1.2.6 allows XSS via PUT requests, because a file that has been uploaded (via httpSwagger.WrapHandler and *webdav.memFile) can subsequently be accessed via a GET request. NOTE: this is independently fixable with respect to CVE-2022-24863, because (if a solution continued to allow PUT requests) large files could have been blocked without blocking JavaScript, or JavaScript could have been blocked without blocking large files.","status":"published","published":"2024-02-11T00:00:00Z","modified":"2026-10-28T02:30:35.740760449Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T15:44:39.244433Z"},{"id":"GHSA-49w7-5r33-jm9m","title":"http-swagger XSS via PUT requests","description":"http-swagger before 1.2.6 allows XSS via PUT requests, because a file that has been uploaded (via httpSwagger.WrapHandler and *webdav.memFile) can subsequently be accessed via a GET request. NOTE: this is independently fixable with respect to CVE-2022-24863, because (if a solution continued to allow PUT requests) large files could have been blocked without blocking JavaScript, or JavaScript could have been blocked without blocking large files.","status":"published","published":"2024-02-29T03:33:18Z","modified":"2025-01-16T19:57:08Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:36.782754Z"},{"id":"GHSA-xg75-q3q5-cqmv","title":"Denial of Service in http-swagger","description":"### Impact\nAllows an attacker to perform a DOS attack consisting of memory exhaustion on the host system.\n\n### Patches\nYes. Please upgrade to v1.2.6.\n\n### Workarounds\nA workaround is to restrict the path prefix to the \"GET\" method. As shown below\n```\nfunc main() {\n\tr := mux.NewRouter()\n\n\tr.PathPrefix(\"/swagger/\").Handler(httpSwagger.Handler(\n\t\thttpSwagger.URL(\"http://localhost:1323/swagger/doc.json\"), //The url pointing to API definition\n\t\thttpSwagger.DeepLinking(true),\n\t\thttpSwagger.DocExpansion(\"none\"),\n\t\thttpSwagger.DomID(\"#swagger-ui\"),\n\t)).Methods(http.MethodGet)\n```\n\n### References\nReporter dongguangli from https://www.huoxian.cn/ company\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [http-swagger](https://github.com/swaggo/http-swagger/issues)\n\n","status":"published","published":"2022-04-22T20:55:52Z","modified":"2024-03-04T18:35:26Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-400","CWE-755"],"updated_at":"2026-11-02T15:46:59.835583Z"},{"id":"GO-2022-0427","title":"Unprotected file upload in github.com/swaggo/http-swagger","description":"The httpSwagger package's HTTP handler provides WebDAV read/write access to an in-memory filesystem. An attacker can exploit this to cause memory exhaustion by uploading many files, XSS attacks by uploading malicious files, or other unexpected behaviors.","status":"published","published":"2024-02-29T15:38:09Z","modified":"2024-05-20T16:03:47Z","updated_at":"2026-11-02T15:47:00.918515Z"}]}}
