Question
Which of the following correctly describes the primary
difference between Cross-Site Request Forgery (CSRF) and Cross-Site Scripting (XSS)?Solution
Cross-Site Request Forgery (CSRF) and Cross-Site Scripting (XSS) are both web security vulnerabilities, but they operate in distinct ways:
- CSRF tricks authenticated users into performing unintended actions on behalf of an attacker by exploiting trust in the user's session. For example, if a logged-in user clicks on a malicious link, the attacker could execute unwanted actions (e.g., fund transfers). CSRF exploits flaws in how web applications handle session tokens or cookies.
- XSS , on the other hand, involves injecting malicious scripts into a web application to execute in the victim’s browser. It primarily targets input validation and output encoding flaws to display or execute harmful code in the user's context.
- Option A: Both CSRF and XSS target the user’s browser, but XSS also indirectly impacts the application.
- Option C: CSRF does not rely on executing JavaScript; it typically involves sending crafted HTTP requests.
- Option D: CSRF does not inherently depend on phishing; it can occur through any malicious link, such as in a forum or ad.
- Option E: CSRF and XSS are protocol-agnostic and can occur over both HTTP and HTTPS.
How much has been disbursed by the government till July ,2023 under the Aatmanirbhar Bharat Rojgar Yojana (ABRY) since the launch of the scheme in Octob...
Which states were classified as “aspirational” in the Fiscal Health Index 2025 due to high debt and fiscal challenges?
How Many statements about India's IPO performance in 2023 is/are correct?
1. Indian stock exchanges recorded 31 IPOs in the fourth quarter of 202...
Who became India’s leading wicket-taker in ODI World Cup history during the 2023 World Cup match at Wankhede Stadium?
- As per S&P Global, what is India's revised GDP growth forecast for FY26?
Which major aerospace company recently collaborated with Indian Railways' Gati Shakti Vishwavidyalaya (GSV) Vadodara to strengthen the Indian aviation s...
Under Section 301 of the Trade Act of 1974, the USTR may initiate an investigation within how many days against a designated country?
Which of the following statements about India's startup ecosystem and the projected rise in unicorns in FY25 is correct?
On which date did the European Union (EU) and India conduct their first joint naval exercise in the Gulf of Guinea?
Exercise KHANJAR 2026 is being conducted at which venue in India?