# CVE-2024-37273: Jan arbitrary file upload vulnerability

Source: https://junglewise.ai/threats/cve-2024-37273-jan-arbitrary-file-upload-vulnerability  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2024-06-04. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2024-37273 · Severity: low · CVSS 3.1 · Published 2024-06-04

Jan is an open-source offline alternative to ChatGPT that runs AI models locally on a user's computer. A vulnerability in Jan's file upload API endpoints allows attackers to write arbitrary files to the system, potentially enabling them to execute malicious code, modify system configurations, or establish persistence through startup scripts—compromising the confidentiality, integrity, and availability of affected systems.

Technologies: [@janhq/core (npm)](https://junglewise.ai/threats/technologies/janhq-core). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2024-37273 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2024-37273 being exploited in the wild.

**How severe is CVE-2024-37273?** Low severity, with a CVSS score of 3.1, published 4 June 2024.

**Which products and versions are affected?** @janhq/core (npm) SEMVER:introduced=0,last_affected=0.1.11.

**Is there a fix for CVE-2024-37273?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2024-37273 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2024-37273?** Check whether you run @janhq/core (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The /v1/app/writeFileSync and /v1/app/appendFileSync endpoints in Jan v0.4.12 lack proper input validation and path filtering, enabling arbitrary file write via path traversal attacks (CWE-22, CWE-434). An unauthenticated attacker on the network can send a crafted POST request with relative paths (e.g., "/../../../../../tmp/a.txt") to write or append content to any file on the system. By targeting initialization scripts (.bashrc, /etc/init.d/) or boot items, an attacker can achieve arbitrary code execution and system compromise. The vulnerability affects all versions up to 0.1.11 of the @janhq/core package. Patches are required to implement strict path canonicalization and whitelist allowed write directories.

## Affected products

- Jan @janhq/core up to 0.1.11

## Identifiers

- CVE-2024-37273
- GHSA-878h-rqcq-mv3x

## Timeline

- 2024-06-04: disclosed
- 2024-06-11: advisory

## References

- [https://github.com/HackAllSec/CVEs/tree/main/Jan%20Arbitrary%20File%20Upload%20vulnerability](https://github.com/HackAllSec/CVEs/tree/main/Jan%20Arbitrary%20File%20Upload%20vulnerability)

## Related threats

- [Jan arbitrary file upload vulnerability](https://junglewise.ai/threats/cve-2024-36858-jan-arbitrary-file-upload-vulnerability)
- [Jan path traversal arbitrary file read](https://junglewise.ai/threats/cve-2024-36857-jan-path-traversal-arbitrary-file-read)
