[KongchangAI]
Concept跨站脚本攻击

XSS

XSS (cross-site scripting) is a common web security vulnerability in which an attacker injects malicious scripts into a web page. When other users browse that page, the script executes, allowing the attacker to steal user information or perform other malicious operations.

Core Facts

Timeline (last 90 days)

Nov 2

CSRF is when an attacker induces a logged-in user to unknowingly initiate a request, essentially 'borrowing' the credentials in the user's browser; XSS is injecting malicious scripts into a page, which can directly steal tokens; the two are often exploited in combination, and defense requires multiple measures such as output encoding, CSP, SameSite cookies and CSRF tokens.

Unverified50%
Nov 2

Session tokens usually exist in the form of a Session ID in a Cookie or a JWT, and subsequent requests use them to identify the user; if the Cookie is not set with HttpOnly, XSS scripts can read it directly; if not set with Secure, the token may leak over plaintext HTTP; if not set with SameSite, it is vulnerable to CSRF attacks.

Unverified50%
Nov 1

The stateless nature of the HTTP protocol, request methods (GET/POST), status codes, header fields, and the Cookie mechanism are directly relevant to understanding Web vulnerabilities such as SQL injection, XSS, and CSRF.

Unverified50%
Oct 21

A WAF (Web Application Firewall) is a security device or software deployed in front of web servers that intercepts known attack patterns by inspecting the characteristics of HTTP requests.

Verified65%
Oct 20

Common entry-level directions for SRC include medium- and low-risk vulnerabilities such as information disclosure, unauthorized access, XSS and SSRF; these vulnerabilities have low tool dependence and clear verification paths, making them suitable as practice targets.

Unverified50%
Oct 17

Input validation is used to prevent attacks such as SQL injection and cross-site scripting (XSS), and the principle is to trust no data from the client side.

Unverified50%
Oct 16

The LaTeX renderer uses an <iframe sandbox> mechanism to defend against XSS risks, layered with DOMPurify for HTML sanitization.

Unverified50%
Oct 16

If model output is rendered as HTML by the application, there is an XSS risk; if it is used to concatenate queries or shell commands, there is an injection risk, so model output should be treated as untrusted user input.

Unverified50%
Oct 14

Cross-site scripting (XSS) is the injection of malicious JavaScript into a page; when other users browse that page the script executes in their browser and can steal cookies or session tokens.

Unverified50%
Oct 13

XSS (Cross-Site Scripting) is when a page renders user input directly as HTML, causing malicious scripts to execute in other people's browsers; it is divided into reflected, stored, and DOM types.

Unverified50%

16 more timeline events

All Facts (20)

Verified

Vulnerabilities such as SQL injection, XSS, and SSRF have long occupied the OWASP Top 10 security risk list.

80%
Verified

A WAF (Web Application Firewall) is a security device or software deployed in front of web servers that intercepts known attack patterns by inspecting the characteristics of HTTP requests.

65%
Unverified

CSP (Content Security Policy) is an HTTP security header that defends against cross-site scripting (XSS) and data injection attacks through a whitelist mechanism.

60%
Unverified

CSRF is when an attacker induces a logged-in user to unknowingly initiate a request, essentially 'borrowing' the credentials in the user's browser; XSS is injecting malicious scripts into a page, which can directly steal tokens; the two are often exploited in combination, and defense requires multiple measures such as output encoding, CSP, SameSite cookies and CSRF tokens.

50%
Unverified

Session tokens usually exist in the form of a Session ID in a Cookie or a JWT, and subsequent requests use them to identify the user; if the Cookie is not set with HttpOnly, XSS scripts can read it directly; if not set with Secure, the token may leak over plaintext HTTP; if not set with SameSite, it is vulnerable to CSRF attacks.

50%
Unverified

The stateless nature of the HTTP protocol, request methods (GET/POST), status codes, header fields, and the Cookie mechanism are directly relevant to understanding Web vulnerabilities such as SQL injection, XSS, and CSRF.

50%
Unverified

Common entry-level directions for SRC include medium- and low-risk vulnerabilities such as information disclosure, unauthorized access, XSS and SSRF; these vulnerabilities have low tool dependence and clear verification paths, making them suitable as practice targets.

50%
Unverified

Input validation is used to prevent attacks such as SQL injection and cross-site scripting (XSS), and the principle is to trust no data from the client side.

50%
Unverified

The LaTeX renderer uses an <iframe sandbox> mechanism to defend against XSS risks, layered with DOMPurify for HTML sanitization.

50%
Unverified

If model output is rendered as HTML by the application, there is an XSS risk; if it is used to concatenate queries or shell commands, there is an injection risk, so model output should be treated as untrusted user input.

50%
Unverified

Cross-site scripting (XSS) is the injection of malicious JavaScript into a page; when other users browse that page the script executes in their browser and can steal cookies or session tokens.

50%
Unverified

XSS (Cross-Site Scripting) is when a page renders user input directly as HTML, causing malicious scripts to execute in other people's browsers; it is divided into reflected, stored, and DOM types.

50%
Unverified

React's JSX rendering automatically escapes strings before inserting them into the DOM, thereby eliminating most traditional XSS attack paths.

50%
Unverified

Using dangerouslySetInnerHTML in React bypasses the automatic escaping mechanism, leaving the developer fully responsible for content sanitization, and it is a common entry point for XSS.

50%
Unverified

The CSP response header, by restricting script source domains and inline script execution, can prevent malicious code from running when XSS injection occurs, and is the second line of defense for React applications.

50%
Unverified

HttpOnly cookies can prevent JavaScript from reading session tokens, and are an effective measure against XSS session theft.

50%
Unverified

If the refresh token is placed in localStorage, an XSS occurrence is equivalent to account compromise.

50%
Unverified

If LLM output is rendered or executed without encoding, it can lead to XSS (when rendered as HTML/Markdown), SQL injection (when concatenated into database queries), and SSRF (when URLs are included for backend fetching).

50%
Unverified

Blindly injecting large numbers of payloads will trigger WAFs and cause the IP to be blocked, making it impossible to detect vulnerabilities even if they exist in the target.

50%
Unverified

A good XSS detection Skill should adopt a layered process of reconnaissance before escalation: first check whether the Content-Type is text/html, test reflection with a unique marker, inject HTML first to determine HTML injection, and then escalate step by step to XSS.

50%

Source Articles