Skip to content

Instantly share code, notes, and snippets.

@jub0bs
jub0bs / index.md
Created December 7, 2023 17:26 — forked from paj28/index.md

Unicode XSS via Combining Characters

Most application security practitioners are familiar with Unicode XSS, which typically arises from the Unicode character fullwidth-less-than-sign. It’s not a common vulnerability but does occasionally appear in applications that otherwise have good XSS protection. In this blog I describe another variant of Unicode XSS that I have identified, using combining characters. I’ve not observed this in the wild, so it’s primarily of theoretical concern. But the scenario is not entirely implausible and I’ve not otherwise seen this technique discussed, so I hope this is useful.

Recap of Unicode XSS

Lab: https://4t64ubva.xssy.uk/

A quick investigation of the lab shows that it is echoing the name parameter, and performing HTML escaping:

@jub0bs
jub0bs / gcf-method-handler.go
Last active April 23, 2021 19:57
The executed function of a Google Cloud Function can be a method on a custom type (Srv.Handle, here), under the condition that both the type and method be exported.
package p
import (
"fmt"
"net/http"
)
var Srv = Server{}
type Server struct{}