Cross-site scripting is a type of vulnerability where attackers inject malicious scripts into web pages. You can prevent it by sanitizing input data and output encoding.