# CVE-2022-4526: django-photologue Default Template photo_detail.html cross site scripting


- **Severity:** Low 3.5 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 15 Dec 2022
- **Updated:** 15 Apr 2025
- **Also known as:** GHSA-287q-jfcp-9vhv, PYSEC-2022-43061

## What is CVE-2022-4526?

CVE-2022-4526 is a low-severity vulnerability in unspecified django-photologue, published on 15 Dec 2022. 

### Official description

A vulnerability was found in django-photologue up to 3.15.1 and classified as problematic. Affected by this issue is some unknown functionality of the file photologue/templates/photologue/photo_detail.html of the component Default Template Handler. The manipulation of the argument object.caption leads to cross site scripting. The attack may be launched remotely. Upgrading to version 3.16 is able to address this issue. The name of the patch is 960cb060ce5e2964e6d716ff787c72fc18a371e7. It is recommended to apply a patch to fix this issue. VDB-215906 is the identifier assigned to this vulnerability.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation), CWE-707 (Improper Neutralization)

## Which versions are affected by CVE-2022-4526?

3 open source packages ship an affected version, including django-photologue. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `django-photologue` | PyPI | All versions | 3.16 |
| `django-photologue` | PyPI | All versions | 3.16 |
| `django-photologue` | PyPI | All versions | 3.16 |

Products: Django-Photologue Project Django-Photologue.

## How do I fix CVE-2022-4526?

Upgrade django-photologue to 3.16 or later.

## Is CVE-2022-4526 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-4526 and fix it if it is affected.

What it is: CVE-2022-4526 is a low-severity vulnerability in unspecified django-photologue, published on 15 Dec 2022. 
Exploitation: There is no known exploitation of CVE-2022-4526 in the wild and no public exploit code.

Affected packages and fixed versions:
- django-photologue (PyPI): affected all versions; fixed in 3.16
- django-photologue (PyPI): affected all versions; fixed in 3.16
- django-photologue (PyPI): affected all versions; fixed in 3.16

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-4526/ (Markdown: https://insights.sbomify.com/CVE-2022-4526/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-4526
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-4526
- OSV: https://osv.dev/vulnerability/CVE-2022-4526

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-4526/
Summaries are generated and may contain mistakes; the official description above is the record.
