XSS in yarr

20 Oct, 2026

yarr is an open source RSS reader written in Go. I use it myself in my homelab and I was interested one day how yarr loads and renders this content.

Taking a look at their source we can see how. When you add an RSS feed, each post within the feed is treated as an "item" within yarr's object model. These are processed with the aptly named handleItem function.

func (s *Server) handleItem(w http.ResponseWriter, r *http.Request) {
    id, err := strconv.ParseInt(r.PathValue("id"), 10, 64)
        ...
    switch r.Method {
    case http.MethodGet:
        item := s.db(r).GetItem(id)
                ...
        item.Content = sanitizer.Sanitize(item.Link, item.Content)
        for i, link := range item.MediaLinks {
            item.MediaLinks[i].Description = sanitizer.Sanitize(item.Link, link.Description)
        }
                ...