{"id":"CVE-2023-50710","aliases":["CVE-2023-50710","GHSA-f6gv-hh8j-q8vq"],"related":[],"kind":"vulnerability","state":"published","title":"Hono's named path parameters can be overridden in TrieRouter","summary":"Hono is a web framework written in TypeScript. Prior to version 3.11.7, clients may override named path parameter values from previous requests if the application is using TrieRouter. So, there is a risk that a privileged user may use unintended parameters when deleting REST API resources. TrieRouter is used either explicitly or when the application matches a pattern that is not supported by the default RegExpRouter. Version 3.11.7 includes the change to fix this issue. As a workaround, avoid using TrieRouter directly.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Hono is a web framework written in TypeScript. Prior to version 3.11.7, clients may override named path parameter values from previous requests if the application is using TrieRouter. So, there is a risk that a privileged user may use unintended parameters when deleting REST API resources. TrieRouter is used either explicitly or when the application matches a pattern that is not supported by the default RegExpRouter. Version 3.11.7 includes the change to fix this issue. As a workaround, avoid using TrieRouter directly.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nThe clients may override named path parameter values from previous requests if the application is using TrieRouter. So, there is a risk that a privileged user may use unintended parameters when deleting REST API resources.\n\nTrieRouter is used either explicitly or when the application matches a pattern that is not supported by the default RegExpRouter.\n\nThe code to reproduce it. The server side application:\n\n```ts\nimport { Hono } from 'hono'\nimport { TrieRouter } from 'hono/router/trie-router'\n\nconst wait = async (ms: number) => {\n  return new Promise((resolve) => {\n    setTimeout(resolve, ms)\n  })\n}\n\nconst app = new Hono({ router: new TrieRouter() })\n\napp.use('*', async (c, next) => {\n  await wait(Math.random() * 200)\n  return next()\n})\n\napp.get('/modules/:id/versions/:version', async (c) => {\n  const id = c.req.param('id')\n  const version = c.req.param('version')\n\n  console.log('path', c.req.path)\n  console.log('version', version)\n\n  return c.json({\n    id,\n    version,\n  })\n})\n\nexport default app\n```\n\nThe client code which makes requests to the server application:\n\n```ts\nconst examples = [\n  'http://localhost:8787/modules/first/versions/first',\n  'http://localhost:8787/modules/second/versions/second',\n  'http://localhost:8787/modules/third/versions/third',\n]\n\nconst test = () => {\n  for (const example of examples) {\n    fetch(example)\n      .then((response) => response.json())\n      .then((data) => {\n        const splitted = example.split('/')\n        const expected = splitted[splitted.length - 1]\n\n        if (expected !== data.version) {\n          console.error(`Error: exprected ${expected} but got ${data.version} - url was ${example}`)\n        }\n      })\n  }\n}\n\ntest()\n```\n\nThe results:\n\n```txt\nError: exprected second but got third - url was http://localhost:8787/modules/second/versions/second\nError: exprected first but got third - url was http://localhost:8787/modules/first/versions/first\n```\n\n### Patches\n\n\"v3.11.7\" includes the change to fix this issue.\n\n### Workarounds\n\nDon't use TrieRouter directly.\n\n```ts\n// DON'T USE TrieRouter\nimport { TrieRouter } from 'hono/router/trie-router'\nconst app = new Hono({ router: new TrieRouter() })\n```\n\n### References\n\nRouter options on the Hono website: https://hono.dev/api/hono#router-option","format":"markdown","source":"ghsa"},{"lang":"es","text":"Hono es un framework web escrito en TypeScript. Antes de la versión 3.11.7, los clientes pueden anular los valores de los parámetros de ruta con nombre de solicitudes anteriores si la aplicación utiliza TrieRouter. Por lo tanto, existe el riesgo de que un usuario privilegiado utilice parámetros no deseados al eliminar recursos de la API REST. TrieRouter se usa explícitamente o cuando la aplicación coincide con un patrón que no es compatible con el RegExpRouter predeterminado. La versión 3.11.7 incluye el cambio para solucionar este problema. Como workaround, evite utilizar TrieRouter directamente.","source":"nvd"}],"published":"2023-12-14T17:22:26.836Z","modified":"2026-09-10T03:50:08.982Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:L","score":4.2,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:L","score":4.2,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:L","score":4.2,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"version":"< 3.11.7","status":"affected"}],"vendor":"honojs","product":"hono","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.11.7"}],"ecosystem":"npm","package":"hono","purl":"pkg:npm/hono","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.11.7"}],"vendor":"hono","product":"hono","cpe":"cpe:2.3:a:hono:hono:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/honojs/hono/security/advisories/GHSA-f6gv-hh8j-q8vq","tags":["exploit","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/honojs/hono/commit/8e2b6b08518998783f66d31db4f21b1b1eecc4c8","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/honojs/hono/releases/tag/v3.11.7","tags":["release-notes","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-50710","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/honojs/hono","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-50710","url":"https://www.cve.org/CVERecord?id=CVE-2023-50710","licence":"CVE Terms of Use","modified":"2024-08-02T22:16:47.211Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-f6gv-hh8j-q8vq","url":"https://github.com/advisories/GHSA-f6gv-hh8j-q8vq","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:08.982Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-50710","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-50710","licence":"Public domain","modified":"2026-06-17T06:39:49.790Z"}],"updatedAt":"2026-11-25T22:58:31.360Z","epss":{"score":0.00638,"percentile":0.51918,"date":"2026-12-01T12:00:22.000Z"}}