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

Medium 4.3 Published Updated

Attackers can upload images to arbitrary server directories, potentially overwriting files and causing defacement in Agnai chat systems.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-47171?

CVE-2024-47171 is a medium-severity path traversal vulnerability in agnaistic agnai, published on 26 Sep 2024. Any signed-in user can exploit it over the network, with no action from the victim.

Official 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.

Weakness: CWE-22, CWE-35

Which versions are affected by CVE-2024-47171?

2 open source packages ship an affected version, including agnai. It affects 1 product.

PackageAffectedFixed in
agnai npmAll versions1.0.330
agnai npmAll versions1.0.330

Products include Agnai Agnai.

How do I fix CVE-2024-47171?

Upgrade agnai to 1.0.330 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2024-47171 being exploited?

There is no known exploitation of CVE-2024-47171 in the wild and no public exploit code.

Sources

Also known as GHSA-g54f-66mw-hv66.

Is CVE-2024-47171 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free