# CVE-2024-49377: Jinja2 Templates are vulnerable to XSS attacks due to their configuration in OctoPrint

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, CNA) `CVSS:3.1/AV:A/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L`
- **CVSS metrics:** Attack vector: Adjacent network; Attack complexity: Low; Privileges required: None; User interaction: Required; Scope: Unchanged; Confidentiality impact: Low; Integrity impact: Low; Availability impact: Low
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.50% (percentile 36, 2026-11-26)
- **CWE:** CWE-79, CWE-80
- **Aliases:** GHSA-xvxq-g8hw-fx4g, PYSEC-2024-201
- **Published:** 2024-11-05T15:05:55.000Z
- **Modified:** 2026-06-17T07:59:47.483Z

## Who should check

- Projects that depend on PyPI package octoprint (\< 1.10.3)
- Anyone running OctoPrint \< 1.10.3

## Description

OctoPrint provides a web interface for controlling consumer 3D printers. OctoPrint versions up until and including 1.10.2 contain reflected XSS vulnerabilities in the login dialog and the standalone application key confirmation dialog.  An attacker who successfully talked a victim into clicking on a specially crafted login link, or a malicious app running on a victim's computer triggering the application key workflow with specially crafted parameters and then redirecting the victim to the related standalone confirmation dialog could use this to retrieve or modify sensitive configuration settings, interrupt prints or otherwise interact with the OctoPrint instance in a malicious way. The above mentioned specific vulnerabilities of the login dialog and the standalone application key confirmation dialog have been patched in the bugfix release 1.10.3 by individual escaping of the detected locations. A global change throughout all of OctoPrint's templating system with the upcoming 1.11.0 release will handle this further, switching to globally enforced automatic escaping and thus reducing the attack surface in general. The latter will also improve the security of third party plugins. During a transition period, third party plugins will be able to opt into the automatic escaping. With OctoPrint 1.13.0, automatic escaping will be switched over to be enforced even for third party plugins, unless they explicitly opt-out.

## Affected and fixed versions

- PyPI `octoprint`: affected \< 1.10.3; fixed 1.10.3 (osv)
- OctoPrint: \< 1.10.3 (cvelist)

## Mitigation

- Upgrade octoprint to 1.10.3 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-49377. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-49377.md
Affected: octoprint < 1.10.3
Fixed in: 1.10.3

Steps:
1. Search this machine and project for octoprint (PyPI), OctoPrint: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-49377 being exploited?

There is no confirmed exploitation: CVE-2024-49377 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.50% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-49377?

Medium: CVSS 5.5 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2024-49377?

octoprint \< 1.10.3.

### Is there a fix for CVE-2024-49377?

Yes. Fixed in 1.10.3. Upgrade octoprint to 1.10.3 or later.

### How do I check if I'm affected by CVE-2024-49377?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/OctoPrint/OctoPrint/security/advisories/GHSA-xvxq-g8hw-fx4g>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2024-49377>
- patch: <https://github.com/OctoPrint/OctoPrint/commit/b8a6b0a75202edac3bb142a8e4f9041a0b6825bf>
- other: <https://github.com/OctoPrint/OctoPrint>
- other: <https://github.com/pypa/advisory-database/tree/main/vulns/octoprint/PYSEC-2024-201.yaml>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-49377>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-xvxq-g8hw-fx4g> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2024-201> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2024-49377> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-49377>
