{"id":"CVE-2024-47170","aliases":["CVE-2024-47170","GHSA-h355-hm5h-cm8h"],"related":[],"kind":"vulnerability","state":"published","title":"Agnai File Disclosure Vulnerability: JSON via Path Traversal","summary":"Agnai is an artificial-intelligence-agnostic multi-user, mult-bot roleplaying chat system. A vulnerability in versions prior to 1.0.330 permits attackers to read arbitrary JSON files at attacker-chosen locations on the server. This issue can lead to unauthorized access to sensitive information and exposure of confidential configuration files. This only affects installations with `JSON_STORAGE` enabled which is intended to local/self-hosting only. Version 1.0.330 fixes this issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Agnai is an artificial-intelligence-agnostic multi-user, mult-bot roleplaying chat system. A vulnerability in versions prior to 1.0.330 permits attackers to read arbitrary JSON files at attacker-chosen locations on the server. This issue can lead to unauthorized access to sensitive information and exposure of confidential configuration files. This only affects installations with `JSON_STORAGE` enabled which is intended to local/self-hosting only. Version 1.0.330 fixes this issue.","source":"cvelist"},{"lang":"en","text":"### CWE-35: Path Traversal\n\nhttps://cwe.mitre.org/data/definitions/35.html\n\n### CVSSv3.1 4.3 - Medium\nCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N\nCVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N\n\n### Summary\n\nA vulnerability has been discovered in **Agnai** that permits attackers to read arbitrary JSON files at attacker-chosen locations on the server. This issue can lead to unauthorized access to sensitive information and exposure of confidential configuration files.\n**This only affects installations with `JSON_STORAGE` enabled which is intended to local/self-hosting only.**\n\n### Details & PoC\n\nThis is a path traversal vulnerability. An attacker can exploit this vulnerability by sending a specially crafted request:\n\n```tsx\nGET /api/json/messages/%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%61%70%70%2fpackage HTTP/1.1\n```\n\nIn this example, the attacker retrieves the `package.json` file content from the server by manipulating the file path.\n\nThe request is processed by the `loadMessages` handler in `agnai/srv/api/json/index.ts` and a file is read and returned to the client. The read filename is constructed using string interpolation, with no guard or check for path traversal: https://github.com/agnaistic/agnai/blob/2b878b7ca66471c5dd080197ad9ca2f7f0022655/srv/api/json/index.ts#L77\n\n#### Constraints\n\nEnvironment constraints: JSON Storage enabled (non standard)\n\n### Impact\n\nThis vulnerability is classified as a path traversal vulnerability. Specifically, any JSON file on the server which the webserver process has read privileges for, can be disclosed to the attacker.\n\n### Credit\n- @ropwareJB\n- @noe233","format":"markdown","source":"ghsa"},{"lang":"es","text":"Agnai es un sistema de chat multiusuario y multibot que funciona con inteligencia artificial y es independiente de la misma. Una vulnerabilidad en las versiones anteriores a la 1.0.330 permite a los atacantes leer archivos JSON arbitrarios en ubicaciones elegidas por el atacante en el servidor. Este problema puede provocar acceso no autorizado a información confidencial y la exposición de archivos de configuración confidenciales. Esto solo afecta a las instalaciones con `JSON_STORAGE` habilitado, que está destinado únicamente al alojamiento local o propio. La versión 1.0.330 soluciona este problema.","source":"nvd"}],"published":"2024-09-26T17:16:21.950Z","modified":"2026-06-17T07:56:40.007Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","score":4.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","score":4.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","score":4.3,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-22","CWE-35"],"affected":[{"ranges":[{"version":"< 1.0.330","status":"affected"}],"vendor":"agnaistic","product":"agnai","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.0.330"}],"ecosystem":"npm","package":"agnai","purl":"pkg:npm/agnai","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.0.330"}],"vendor":"agnai","product":"agnai","cpe":"cpe:2.3:a:agnai:agnai:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/agnaistic/agnai/security/advisories/GHSA-h355-hm5h-cm8h","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47170","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/agnaistic/agnai","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2024-10-10T17:06:45.896Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-47170","url":"https://www.cve.org/CVERecord?id=CVE-2024-47170","licence":"CVE Terms of Use","modified":"2025-03-12T21:16:50.484Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-h355-hm5h-cm8h","url":"https://github.com/advisories/GHSA-h355-hm5h-cm8h","licence":"CC-BY-4.0","modified":"2024-09-26T21:11:05.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-47170","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47170","licence":"Public domain","modified":"2026-06-17T07:56:40.007Z"}],"updatedAt":"2026-11-25T22:58:45.803Z","epss":{"score":0.00655,"percentile":0.4618,"date":"2026-11-30T12:00:22.000Z"}}