You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.
@model WebApplication.Models.DefaultModel
@{
var ko = new KnockoutContext<WebApplication.Models.DefaultModel>(ViewContext);
}
<form>
@ko.Html.TextBox(m => m.Foo)
@ko.Html.Span(m => m.Foo)
<button type="submit">Send</button>
</form>
@ko.Apply(Model)
model:
public class DefaultModel
{
public string Foo { get; set; }
}
action:
[ValidateInput(false)] // turn off XSS protection in ASP.NET
public ActionResult Index(Models.DefaultModel model)
{
Response.AddHeader("X-XSS-Protection", "0"); // turn off XSS protection in browser
return View(model ?? new Models.DefaultModel());
}
Steps to reproduce:
Type </script><script>alert('XSS');</script><script> into textbox
Example form to reproduce:
model:
action:
Steps to reproduce:
</script><script>alert('XSS');</script><script>
into textboxVulnerable line:
knockout-mvc/PerpetuumSoft.Knockout/KnockoutContext.cs
Line 61 in 959da99
Possible solution:
Workaround:
The text was updated successfully, but these errors were encountered: