apsyleg_
PentestingCheatsheetsFrontendDevOpsTools
ru
PentestingCheatsheetsFrontendDevOpsTools
  1. Home
  2. /Notes
  3. /Pentesting
  4. /PortSwigger
  5. /Reflected XSS in a Template Literal (PortSwigger Lab)
On this page
  • Lab
  • Reconnaissance
  • Exploitation
April 28, 2026apsyleg1 min read
#portswigger #xss #template-literal #javascript #web-security

Reflected XSS in a Template Literal

Lab#

Reflected XSS into a JavaScript template literal with angle brackets, single, double quotes, backslash and backticks Unicode-escaped · Practitioner

Reconnaissance#

The search input string reflects into JavaScript code. Template literal syntax is used — injection via ${} is possible.

Exploitation#

Final payload:

${alert(25)}

Lab solved.

More in this category

June 20, 2026

Arbitrary Object Injection in PHP (PortSwigger Lab)

Recovering leaked source code and injecting a serialized CustomTemplate object whose __destruct deletes an arbitrary file.

June 16, 2026

Using Application Functionality to Exploit Insecure Deserialization (PortSwigger Lab)

Tampering with the `avatar_link` field in the session object to delete an arbitrary file via the account-delete feature.

June 15, 2026

Modifying Serialized Data Types (PortSwigger Lab)

Abusing PHP loose comparison by changing the `access_token` type to integer `0` to bypass authentication.

On this page

  • Lab
  • Reconnaissance
  • Exploitation
apsyleg © 2026