CVE-2024-47170 Agnai File Disclosure Vulnerability: JSON via Path Traversal

Medium 4.3 Published Updated

Attackers can read arbitrary JSON files on the server if JSON_STORAGE is enabled, exposing sensitive configuration data.

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-47170?

CVE-2024-47170 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 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.

Weakness: CWE-22, CWE-35

Which versions are affected by CVE-2024-47170?

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-47170?

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-47170 being exploited?

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

Sources

Also known as GHSA-h355-hm5h-cm8h.

Is CVE-2024-47170 in your software?

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

Check your SBOMs for free