CVE-2026-40353
Stored XSS in wger Ingredient License Author Field
Publication date: 2026-04-17
Last updated on: 2026-04-24
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| wger | wger | to 2.5 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-79 | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability exists in wger, a free, open-source workout and fitness manager, in versions 2.5 and below. The issue arises because the attribution_link property in AbstractLicenseModel constructs HTML by directly inserting user-controlled license fields, such as license_author, without properly escaping them. Additionally, the templates render this HTML using Django's |safe filter, which allows the inserted content to be interpreted as code rather than plain text.
An authenticated user can exploit this by creating an ingredient with a malicious license_author value containing JavaScript code. When any visitor views the ingredient page, this JavaScript executes in their browser, resulting in a stored Cross-Site Scripting (XSS) attack.
How can this vulnerability impact me? :
This stored XSS vulnerability can allow attackers to execute arbitrary JavaScript in the browsers of users who visit the affected ingredient pages. Potential impacts include theft of user session cookies, defacement of the website, redirection to malicious sites, or performing actions on behalf of the user without their consent.
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, upgrade wger to version 2.5 or later, where the issue has been fixed.