Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-28499: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in vapor leaf-kit

0
Medium
VulnerabilityCVE-2026-28499cvecve-2026-28499cwe-79cwe-80cwe-116
Published: Wed Mar 18 2026 (03/18/2026, 01:19:36 UTC)
Source: CVE Database V5
Vendor/Project: vapor
Product: leaf-kit

Description

CVE-2026-28499 is a medium severity cross-site scripting (XSS) vulnerability in vapor's leaf-kit templating language prior to version 1. 14. 2. The issue arises because HTML escaping fails when templates print collections like arrays or dictionaries using the #(value) syntax, allowing untrusted input to be rendered unescaped. This improper neutralization of input can lead to XSS attacks without requiring authentication or user interaction. The vulnerability has a CVSS 4. 0 base score of 6. 9, reflecting its network exploitable nature and lack of prerequisites. Although no known exploits are currently reported in the wild, affected applications using vulnerable versions of leaf-kit are at risk of client-side script injection. Upgrading to leaf-kit version 1.

AI-Powered Analysis

AILast updated: 03/18/2026, 01:43:19 UTC

Technical Analysis

CVE-2026-28499 identifies a cross-site scripting (XSS) vulnerability in the vapor leaf-kit templating engine, which uses a Swift-inspired syntax for generating HTML content. The vulnerability exists in versions prior to 1.14.2, where the HTML escaping mechanism fails when templates output collections such as arrays or dictionaries using the #(value) syntax. This failure results in unescaped, potentially malicious input being rendered directly into web pages, violating proper input neutralization principles (CWE-79, CWE-80, CWE-116). The flaw allows attackers to inject arbitrary client-side scripts, which can execute in the context of users’ browsers without requiring authentication or user interaction. The vulnerability is remotely exploitable over the network with low attack complexity and no privileges needed. The CVSS 4.0 vector (AV:N/AC:L/PR:N/UI:N) confirms this ease of exploitation. Although no active exploits have been reported, the widespread use of vapor leaf-kit in Swift-based web applications means that vulnerable deployments could be targeted for XSS attacks, potentially leading to session hijacking, credential theft, or defacement. The issue was addressed in leaf-kit version 1.14.2 by fixing the HTML escaping logic for collections, ensuring that all output is properly sanitized before rendering. Developers and organizations using leaf-kit should upgrade promptly to mitigate this risk.

Potential Impact

The primary impact of this vulnerability is the potential for cross-site scripting attacks, which can compromise the confidentiality and integrity of user data by enabling attackers to execute arbitrary JavaScript in victims’ browsers. This can lead to session hijacking, theft of sensitive information such as cookies or credentials, unauthorized actions performed on behalf of users, and website defacement. Since the vulnerability does not require authentication or user interaction, it can be exploited remotely and silently, increasing the risk to any web application using vulnerable versions of leaf-kit. The scope of affected systems includes all web applications that utilize leaf-kit templating versions prior to 1.14.2, particularly those that render user-supplied collections without additional sanitization. Although availability impact is minimal, the reputational damage and potential regulatory consequences from data breaches can be significant. Organizations relying on vapor leaf-kit for web content generation should consider this a moderate risk that warrants timely remediation to prevent exploitation.

Mitigation Recommendations

To mitigate this vulnerability, organizations should immediately upgrade all instances of vapor leaf-kit to version 1.14.2 or later, where the HTML escaping issue has been resolved. Developers should audit their templates to identify any usage of the #(value) syntax with collections and verify that no unescaped user input is rendered. Implement additional input validation and output encoding layers as defense-in-depth, especially for any dynamic content derived from untrusted sources. Employ Content Security Policy (CSP) headers to restrict the execution of unauthorized scripts and reduce the impact of potential XSS attacks. Regularly review and update dependencies to incorporate security patches promptly. Conduct security testing, including automated scanning and manual code reviews, to detect similar injection flaws. Finally, educate development teams on secure templating practices and the importance of proper input neutralization to prevent future vulnerabilities.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-02-27T20:57:47.708Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 69b9ffb5771bdb17490566fe

Added to database: 3/18/2026, 1:28:21 AM

Last enriched: 3/18/2026, 1:43:19 AM

Last updated: 3/18/2026, 5:44:51 AM

Views: 8

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses