CVE-2025-53528: Cadwyn XSS Vulnerability in Docs Page

cadwyn Updated 02 Oct 2025

Summary

21/07/2025
Yes i
High
7.6

CVE-2025-53528: Cadwyn vulnerable to XSS on the docs page. Affects cadwyn versions < 5.4.3. Fixed in 5.4.3. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Cadwyn is an open-source framework designed for building APIs with a focus on simplicity and ease of use. It leverages FastAPI to provide a user-friendly interface for API documentation. However, it is susceptible to a reflected Cross-Site Scripting (XSS) vulnerability that can be exploited through the 'version' parameter in the '/docs' endpoint.

Vulnerability Detail

The vulnerability arises from the improper handling of user-supplied input in the 'version' parameter of the '/docs' endpoint. This allows attackers to inject malicious JavaScript code, which can be executed in the context of the user's session. The root cause is the use of the get_swagger_ui_html function from FastAPI, which does not sanitize or encode its arguments. An attacker can exploit this vulnerability by crafting a URL that includes a payload, leading to potential data theft or session hijacking.

How To Fix

Minimum fixed version

5.4.3

This is the first release that contains the fix.

pip install --upgrade "cadwyn==5.4.3"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid using the 'version' parameter in the '/docs' endpoint until the package is updated. Additionally, consider implementing input validation and sanitization in your application to prevent XSS attacks.

Conclusion

The Cadwyn framework is vulnerable to a reflected XSS attack through the '/docs' endpoint due to improper handling of user input. It is crucial to update to version 5.4.3 or later to mitigate this risk. Implementing input validation and using tools like Vulert can help maintain the security of your applications.

See every vulnerability recorded for cadwyn →

Share this vulnerability

FAQ

CVE-2025-53528 is a vulnerability in the Cadwyn framework that allows for reflected XSS attacks through the '/docs' endpoint.

An attacker can exploit this vulnerability to execute arbitrary JavaScript in the context of a user's session, potentially leading to data theft or session hijacking.

Yes, the vulnerability has been patched in Cadwyn version 5.4.3. It is recommended to update to this version or later.

If you cannot update immediately, avoid using the 'version' parameter in the '/docs' endpoint and implement input validation to mitigate the risk.

You can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities in your software. You can check your application against known vulnerabilities using the Vulert playground without any signup.

How To Fix

Minimum fixed version

5.4.3

This is the first release that contains the fix.

pip install --upgrade "cadwyn==5.4.3"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback