Misplaced Pages

Cross-site scripting

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

Cross-site scripting ( XSS ) is a type of security vulnerability that can be found in some web applications . XSS attacks enable attackers to inject client-side scripts into web pages viewed by other users. A cross-site scripting vulnerability may be used by attackers to bypass access controls such as the same-origin policy . During the second half of 2007, XSSed documented 11,253 site-specific cross-site vulnerabilities, compared to 2,134 "traditional" vulnerabilities documented by Symantec . XSS effects vary in range from petty nuisance to significant security risk, depending on the sensitivity of the data handled by the vulnerable site and the nature of any security mitigation implemented by the site's owner network .

#126873

79-428: OWASP considers the term cross-site scripting to be a misnomer . It initially was an attack that was used for breaching data across sites, but gradually started to include other forms of data injection attacks. Security on the web depends on a variety of mechanisms, including an underlying concept of trust known as the same-origin policy . This states that if content from one site (such as https://mybank.example1.com )

158-784: A 501(c)(3) non-profit organization in the US established in 2004, supports the OWASP infrastructure and projects. Since 2011, OWASP is also registered as a non-profit organization in Belgium under the name of OWASP Europe VZW. In February 2023, it was reported by Bil Corry, a OWASP Foundation Global Board of Directors officer, on Twitter that the board had voted for renaming from the Open Web Application Security Project to its current name, replacing Web with Worldwide. They have several certification schemes to certify

237-654: A consequence open mail relays have become rare, and many MTAs do not accept messages from open mail relays. The basic Internet message format used for email is defined by RFC   5322 , with encoding of non-ASCII data and multimedia content attachments defined in RFC 2045 through RFC 2049, collectively called Multipurpose Internet Mail Extensions or MIME . The extensions in International email apply only to email. RFC 5322 replaced RFC 2822 in 2008. Earlier, in 2001, RFC 2822 had in turn replaced RFC 822, which had been

316-474: A cross-site scripting flaw will ensue. A reflected attack is typically delivered via email or a neutral web site. The bait is an innocent-looking URL, pointing to a trusted site but containing the XSS vector. If the trusted site is vulnerable to the vector, clicking the link can cause the victim's browser to execute the injected script. The persistent (or stored ) XSS vulnerability is a more devastating variant of

395-405: A cross-site scripting flaw: it occurs when the data provided by the attacker is saved by the server, and then permanently displayed on "normal" pages returned to other users in the course of regular browsing, without proper HTML escaping. A classic example of this is with online message boards where users are allowed to post HTML formatted messages for other users to read. For example, suppose there

474-560: A current Internet connection. The Post Office Protocol 3 (POP3) is a mail access protocol used by a client application to read messages from the mail server. Received messages are often deleted from the server . POP supports simple download-and-delete requirements for access to remote mailboxes (termed maildrop in the POP RFC's). POP3 allows downloading messages on a local computer and reading them even when offline. The Internet Message Access Protocol (IMAP) provides features to manage

553-413: A few characters outside that range and base64 for arbitrary binary data. The 8BITMIME and BINARY extensions were introduced to allow transmission of mail without the need for these encodings, but many mail transport agents may not support them. In some countries, e-mail software violates RFC   5322 by sending raw non-ASCII text and several encoding schemes co-exist; as a result, by default,

632-414: A fragment of JavaScript prepared by the attacker in the security context of the targeted domain (taking advantage of a reflected or non-persistent XSS vulnerability). The definition gradually expanded to encompass other modes of code injection, including persistent and non-JavaScript vectors (including ActiveX , Java , VBScript , Flash , or even HTML scripts), causing some confusion to newcomers to

711-433: A given page while disallowing others on the same page. For example, scripts from example.com could be allowed, while scripts from advertisingagency.com that are attempting to run on the same page could be disallowed. Content Security Policy (CSP) allows HTML documents to opt in to disabling some scripts while leaving others enabled. The browser checks each script against a policy before deciding whether to run it. As long as

790-470: A hole. Any data received by the web application (via email, system logs, IM etc.) that can be controlled by an attacker could become an injection vector. XSS vulnerabilities were originally found in applications that performed all data processing on the server side. User input (including an XSS vector) would be sent to the server, and then sent back to the user as a web page. The need for an improved user experience resulted in popularity of applications that had

869-437: A large corporate environment, with a proprietary protocol specific to Novell Groupwise , Lotus Notes or Microsoft Exchange Servers . Programs used by users for retrieving, reading, and managing email are called mail user agents (MUAs). When opening an email, it is marked as "read", which typically visibly distinguishes it from "unread" messages on clients' user interfaces. Email clients may allow hiding read emails from

SECTION 10

#1732782612127

948-410: A mail store by programs called mail delivery agents (MDAs, also sometimes called local delivery agents, LDAs). Accepting a message obliges an MTA to deliver it, and when a message cannot be delivered, that MTA must send a bounce message back to the sender, indicating the problem. Users can retrieve their messages from servers using standard protocols such as POP or IMAP , or, as is more likely in

1027-402: A mailbox from multiple devices. Small portable devices like smartphones are increasingly used to check email while traveling and to make brief replies, larger devices with better keyboard access being used to reply at greater length. IMAP shows the headers of messages, the sender and the subject and the device needs to request to download specific messages. Usually, the mail is left in folders in

1106-541: A majority of the presentation logic (maybe written in JavaScript ) working on the client-side that pulled data, on-demand, from the server using AJAX . As the JavaScript code was also processing user input and rendering it in the web page content, a new sub-class of reflected XSS attacks started to appear that was called DOM -based cross-site scripting . In a DOM-based XSS attack, the malicious data does not touch

1185-422: A notable implementation by MIT 's CTSS project in 1965. Most developers of early mainframes and minicomputers developed similar, but generally incompatible, mail applications. In 1971 the first ARPANET network mail was sent, introducing the now-familiar address syntax with the ' @ ' symbol designating the user's system address. Over a series of RFCs , conventions were refined for sending mail messages over

1264-461: A remote server and the page or frame does not need to be reloaded). Another problem with script blocking is that many users do not understand it, and do not know how to properly secure their browsers. Yet another drawback is that many sites do not work without client-side scripting, forcing users to disable protection for that site and opening their systems to vulnerabilities. The Firefox NoScript extension enables users to allow scripts selectively from

1343-412: A single piece of electronic mail is called a message . The conventions for fields within emails—the "To", "From", "CC", "BCC" etc.—began with RFC-680 in 1975. An Internet email consists of an envelope and content ; the content consists of a header and a body . Computer-based messaging between users of the same system became possible after the advent of time-sharing in the early 1960s, with

1422-665: A smartphone ranges and differs dramatically across different countries. For example, in comparison to 75% of those consumers in the US who used it, only 17% in India did. As of 2010 , the number of Americans visiting email web sites had fallen 6 percent after peaking in November 2009. For persons 12 to 17, the number was down 18 percent. Young people preferred instant messaging , texting and social media . Technology writer Matt Richtel said in The New York Times that email

1501-467: A variety of other information maintained by the browser on behalf of the user. Cross-site scripting attacks are a case of code injection . Microsoft security-engineers introduced the term "cross-site scripting" in January 2000. The expression "cross-site scripting" originally referred to the act of loading the attacked, third-party web application from an unrelated attack-site, in a manner that executes

1580-422: Is a dating website where members scan the profiles of other members to see if they look interesting. For privacy reasons, this site hides everybody's real name and email. These are kept secret on the server. The only time a member's real name and email are in the browser is when the member is signed in , and they can't see anyone else's. Suppose that Mallory, an attacker, joins the site and wants to figure out

1659-471: Is a form of XSS vulnerability that relies on social engineering in order to trick the victim into executing malicious JavaScript code in their browser. Although it is technically not a true XSS vulnerability due to the fact it relies on socially engineering a user into executing code rather than a flaw in the affected website allowing an attacker to do so, it still poses the same risks as a regular XSS vulnerability if properly executed. Mutated XSS happens when

SECTION 20

#1732782612127

1738-588: Is also part of the header, as defined below. SMTP defines the trace information of a message saved in the header using the following two fields: Other fields added on top of the header by the receiving server may be called trace fields . Internet email was designed for 7-bit ASCII. Most email software is 8-bit clean , but must assume it will communicate with 7-bit servers and mail readers. The MIME standard introduced character set specifiers and two content transfer encodings to enable transmission of non-ASCII data: quoted printable for mostly 7-bit content with

1817-473: Is an HttpOnly flag which allows a web server to set a cookie that is unavailable to client-side scripts. While beneficial, the feature can neither fully prevent cookie theft nor prevent attacks within the browser. While Web 2.0 and Ajax developers require the use of JavaScript, some web applications are written to allow operation without the need for any client-side scripts. This allows users, if they choose, to disable scripting in their browsers before using

1896-479: Is by far the most basic type of web vulnerability. These holes show up when the data provided by a web client, most commonly in HTTP query parameters (e.g. HTML form submission), is used immediately by server-side scripts to parse and display a page of results for and to that user, without properly sanitizing the content. Because HTML documents have a flat, serial structure that mixes control statements, formatting, and

1975-457: Is granted permission to access resources (like cookies etc.) on a web browser, then content from any URL with the same (1) URI scheme (e.g. ftp, http, or https), (2) host name , and (3) port number will share these permissions. Content from URLs where any of these three attributes are different will have to be granted permissions separately. Cross-site scripting attacks use known vulnerabilities in web-based applications , their servers , or

2054-563: Is her script to steal names and emails. If the script is enclosed inside a <script> element, it won't be shown on the screen. Then suppose that Bob, a member of the dating site, reaches Mallory's profile, which has her answer to the First Date question. Her script is run automatically by the browser and steals a copy of Bob's real name and email directly from his own machine. Persistent XSS vulnerabilities can be more significant than other types because an attacker's malicious script

2133-467: Is implemented in Google Chrome since version 63 and Firefox since version 60. OWASP The Open Worldwide Application Security Project ( OWASP ) is an online community that produces freely available articles, methodologies, documentation, tools, and technologies in the fields of IoT , system software and web application security . The OWASP provides free and open resources. It

2212-453: Is led by a non-profit called The OWASP Foundation. The OWASP Top 10 - 2021 is the published result of recent research based on comprehensive data compiled from over 40 partner organizations. Mark Curphey started OWASP on September 9, 2001. Jeff Williams served as the volunteer Chair of OWASP from late 2003 until September 2011. As of 2015 , Matt Konda chaired the Board. The OWASP Foundation,

2291-402: Is no single, standardized classification of cross-site scripting flaws, but most experts distinguish between at least two primary flavors of XSS flaws: non-persistent and persistent . Some sources further divide these two groups into traditional (caused by server-side code flaws) and DOM -based (in client-side code). The non-persistent (or reflected ) cross-site scripting vulnerability

2370-459: Is no technical restriction on the size or number of attachments. However, in practice, email clients, servers , and Internet service providers implement various limitations on the size of files, or complete email – typically to 25MB or less. Furthermore, due to technical reasons, attachment sizes as seen by these transport systems can differ from what the user sees, which can be confusing to senders when trying to assess whether they can safely send

2449-603: Is not always sufficient to prevent many forms of XSS attacks, security encoding libraries are usually easier to use. Some web template systems understand the structure of the HTML they produce and automatically pick an appropriate encoder. Many operators of particular web applications (e.g. forums and webmail) allow users to utilize a limited subset of HTML markup. When accepting HTML input from users (say, <b>very</b> large ), output encoding (such as &lt;b&gt;very&lt;/b&gt; large ) will not suffice since

Cross-site scripting - Misplaced Pages Continue

2528-494: Is often successfully used to send special sales offerings and new product information. Depending on the recipient's culture, email sent without permission—such as an "opt-in"—is likely to be viewed as unwelcome " email spam ". Many users access their personal emails from friends and family members using a personal computer in their house or apartment. Email has become used on smartphones and on all types of computers. Mobile "apps" for email increase accessibility to

2607-442: Is rendered automatically, without the need to individually target victims or lure them to a third-party website. Particularly in the case of social networking sites, the code would be further designed to self-propagate across accounts, creating a type of client-side worm . The methods of injection can vary a great deal; in some cases, the attacker may not even need to directly interact with the web functionality itself to exploit such

2686-419: Is supplied separately to the transport protocol, SMTP , which may be extracted from the header content. The "To:" field is similar to the addressing at the top of a conventional letter delivered according to the address on the outer envelope. In the same way, the "From:" field may not be the sender. Some mail servers apply email authentication systems to messages relayed. Data pertaining to the server's activity

2765-424: Is the open source NoScript add-on which, in addition to the ability to enable scripts on a per-domain basis, provides some XSS protection even when scripts are enabled. The most significant problem with blocking all scripts on all websites by default is substantial reduction in functionality and responsiveness (client-side scripting can be much faster than server-side scripting because it does not need to connect to

2844-429: Is the use of additional security controls when handling cookie -based user authentication. Many web applications rely on session cookies for authentication between individual HTTP requests, and because client-side scripts generally have access to these cookies, simple XSS exploits can steal these cookies. To mitigate this particular threat (though not the XSS problem in general), many web applications tie session cookies to

2923-586: Is to use automated tools that will remove XSS malicious code in web pages, these tools use static analysis and/or pattern matching methods to identify malicious codes potentially and secure them using methods like escaping. When a cookie is set with the SameSite=Strict parameter, it is stripped from all cross-origin requests. When set with SameSite=Lax , it is stripped from all non-"safe" cross-origin requests (that is, requests other than GET, OPTIONS, and TRACE which have read-only semantics). The feature

3002-537: Is too late. Functionality that blocks all scripting and external inclusions by default and then allows the user to enable it on a per-domain basis is more effective. This has been possible for a long time in Internet Explorer (since version 4) by setting up its so called "Security Zones", and in Opera (since version 9) using its "Site Specific Preferences". A solution for Firefox and other Gecko -based browsers

3081-486: The File Transfer Protocol . Proprietary electronic mail systems soon began to emerge. IBM , CompuServe and Xerox used in-house mail systems in the 1970s; CompuServe sold a commercial intraoffice mail product in 1978 to IBM and to Xerox from 1981. DEC's ALL-IN-1 and Hewlett-Packard's HPMAIL (later HP DeskManager) were released in 1982; development work on the former began in the late 1970s and

3160-499: The Internet , and also local area networks . Today's email systems are based on a store-and-forward model. Email servers accept, forward, deliver, and store messages. Neither the users nor their computers are required to be online simultaneously; they need to connect, typically to a mail server or a webmail interface to send or receive messages or download it. Originally a text-only ASCII communications medium, Internet email

3239-478: The iframe tag , link and the script tag. There are several issues with this approach, for example sometimes seemingly harmless tags can be left out which when utilized correctly can still result in an XSS Another popular method is to strip user input of " and ' however this can also be bypassed as the payload can be concealed with obfuscation . Besides content filtering, other imperfect methods for cross-site scripting mitigation are also commonly used. One example

Cross-site scripting - Misplaced Pages Continue

3318-651: The IP address of the user who originally logged in, then only permit that IP to use that cookie. This is effective in most situations (if an attacker is only after the cookie), but obviously breaks down in situations where an attacker is behind the same NATed IP address or web proxy as the victim, or the victim is changing his or her mobile IP . Another mitigation present in Internet Explorer (since version 6), Firefox (since version 2.0.0.5), Safari (since version 4), Opera (since version 9.5) and Google Chrome ,

3397-510: The URL in the To: field. Many clients also support query string parameters for the other email fields, such as its subject line or carbon copy recipients. Many email providers have a web-based email client. This allows users to log into the email account by using any compatible web browser to send and receive their email. Mail is typically not downloaded to the web client, so it cannot be read without

3476-432: The ability to be used for more frequent communication between users and allowed them to check their email and write messages throughout the day. As of 2011 , there were approximately 1.4 billion email users worldwide and 50 billion non-spam emails that were sent daily. Individuals often check emails on smartphones for both personal and work-related messages. It was found that US adults check their email more than they browse

3555-417: The ability to include in-line links and images, set apart previous messages in block quotes , wrap naturally on any display, use emphasis such as underlines and italics , and change font styles. Disadvantages include the increased size of the email, privacy concerns about web bugs , abuse of HTML email as a vector for phishing attacks and the spread of malicious software . Some e-mail clients interpret

3634-432: The actual content, any non-validated user-supplied data included in the resulting page without proper HTML encoding, may lead to markup injection. A classic example of a potential vector is a site search engine: if one searches for a string, the search string will typically be redisplayed verbatim on the result page to indicate what was searched for. If this response does not properly escape or reject HTML control characters,

3713-422: The application. In this way, even potentially malicious client-side scripts could be inserted unescaped on a page, and users would not be susceptible to XSS attacks. Some browsers or browser plugins can be configured to disable client-side scripts on a per-domain basis. This approach is of limited value if scripting is allowed by default, since it blocks bad sites only after the user knows that they are bad, which

3792-451: The attachments. Others separate attachments from messages and save them in a specific directory. The URI scheme , as registered with the IANA, defines the mailto: scheme for SMTP email addresses. Though its use is not strictly defined, URLs of this form are intended to be used to open the new message window of the user's mail client when the URL is activated, with the address as defined by

3871-427: The attacker injects something that is seemingly safe but is rewritten and modified by the browser while parsing the markup. This makes it extremely hard to detect or sanitize within the website's application logic. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters on parameters to CSS font-family. There are several escaping schemes that can be used depending on where

3950-466: The body as HTML even in the absence of a Content-Type: html header field; this may cause various problems. Some web-based mailing lists recommend all posts be made in plain text, with 72 or 80 characters per line for all the above reasons, and because they have a significant number of readers using text-based email clients such as Mutt . Various informal conventions evolved for marking up plain text in email and usenet posts, which later led to

4029-467: The browser will not run programs from untrusted authors. Some large application providers report having successfully deployed nonce-based policies. Trusted types changes Web APIs to check that values have been trademarked as trusted.  As long as programs only trademark trustworthy values, an attacker who controls a JavaScript string value cannot cause XSS.  Trusted types are designed to be auditable by blue teams . Another defense approach

SECTION 50

#1732782612127

4108-441: The developed world, and it is one of the key parts of an 'e-revolution' in workplace communication (with the other key plank being widespread adoption of highspeed Internet ). A sponsored 2010 study on workplace communication found 83% of U.S. knowledge workers felt email was critical to their success and productivity at work. It has some key benefits to business and other organizations, including: Email marketing via " opt-in "

4187-572: The development of formal languages like setext (c. 1992) and many others , the most popular of them being markdown . Some Microsoft email clients may allow rich formatting using their proprietary Rich Text Format (RTF), but this should be avoided unless the recipient is guaranteed to have a compatible email client. Messages are exchanged between hosts using the Simple Mail Transfer Protocol with software programs called mail transfer agents (MTAs); and delivered to

4266-451: The field of information security . XSS vulnerabilities have been reported and exploited since the 1990s. Prominent sites affected in the past include the social-networking sites Twitter and Facebook . Cross-site scripting flaws have since surpassed buffer overflows to become the most common publicly reported security vulnerability, with some researchers in 2007 estimating as many as 68% of websites are likely open to XSS attacks. There

4345-421: The file system. Some clients save individual messages as separate files, while others use various database formats, often proprietary, for collective storage. A historical standard of storage is the mbox format. The specific format used is often indicated by special filename extensions : Some applications (like Apple Mail ) leave attachments encoded in messages for searching while also saving separate copies of

4424-455: The final restrictions on carrying commercial traffic over the Internet ended in 1995, a combination of factors made the current Internet suite of SMTP, POP3 and IMAP email protocols the standard (see Protocol Wars ). The following is a typical sequence of events that takes place when sender Alice transmits a message using a mail user agent (MUA) addressed to the email address of

4503-454: The following fields: RFC 3864 describes registration procedures for message header fields at the IANA ; it provides for permanent and provisional field names, including also fields defined for MIME, netnews, and HTTP, and referencing relevant RFCs. Common header fields for email include: The To: field may be unrelated to the addresses to which the message is delivered. The delivery list

4582-509: The inbox so the user can focus on the unread. Mail can be stored on the client , on the server side, or in both places. Standard formats for mailboxes include Maildir and mbox . Several prominent email clients use their own proprietary format and require conversion software to transfer email between them. Server-side storage is often in a proprietary format but since access is through a standard protocol such as IMAP, moving email from one server to another can be done with any MUA supporting

4661-471: The knowledge of students in particular areas of security. Baseline set of security standards applicable across technology stacks teaching learners about the OWASP top ten vulnerabilities. The OWASP organization received the 2014 Haymarket Media Group SC Magazine Editor's Choice award. Email Email (short for electronic mail ; alternatively spelled e-mail ) is a method of transmitting and receiving messages using electronic devices. It

4740-594: The latter became the world's largest selling email system. The Simple Mail Transfer Protocol (SMTP) was implemented on the ARPANET in 1983. LAN email systems emerged in the mid-1980s. For a time in the late 1980s and early 1990s, it seemed likely that either a proprietary commercial system or the X.400 email system, part of the Government Open Systems Interconnection Profile (GOSIP), would predominate. However, once

4819-660: The limit is 998 characters. Header fields defined by RFC 5322 contain only US-ASCII characters; for encoding characters in other sets, a syntax specified in RFC 2047 may be used. In some examples, the IETF EAI working group defines some standards track extensions, replacing previous experimental extensions so UTF-8 encoded Unicode characters may be used within the header. In particular, this allows email addresses to use non-ASCII characters. Such addresses are supported by Google and Microsoft products, and promoted by some government agents. The message header must include at least

SECTION 60

#1732782612127

4898-515: The mail server. Messaging Application Programming Interface (MAPI) is used by Microsoft Outlook to communicate to Microsoft Exchange Server —and to a range of other email server products such as Axigen Mail Server , Kerio Connect , Scalix , Zimbra , HP OpenMail , IBM Lotus Notes , Zarafa , and Bynari where vendors have added MAPI support to allow their products to be accessed directly via Outlook. Email has been widely accepted by businesses, governments and non-governmental organizations in

4977-402: The medium for users who are out of their homes. While in the earliest years of email, users could only access email on desktop computers, in the 2010s, it is possible for users to check their email when they are away from home, whether they are across town or across the world. Alerts can also be sent to the smartphone or other devices to notify them immediately of new messages. This has given email

5056-510: The message in a non-Latin alphabet language appears in non-readable form (the only exception is a coincidence if the sender and receiver use the same encoding scheme). Therefore, for international character sets , Unicode is growing in popularity. Most modern graphic email clients allow the use of either plain text or HTML for the message body at the option of the user. HTML email messages often include an automatic-generated plain text copy for compatibility. Advantages of HTML include

5135-426: The message, as unstructured text, sometimes containing a signature block at the end. The header is separated from the body by a blank line. RFC 5322 specifies the syntax of the email header. Each email message has a header (the "header section" of the message, according to the specification), comprising a number of fields ("header fields"). Each field has a name ("field name" or "header field name"), followed by

5214-513: The plug-in systems on which they rely. Exploiting one of these, attackers fold malicious content into the content being delivered from the compromised site. When the resulting combined content arrives at the client-side web browser, it has all been delivered from the trusted source, and thus operates under the permissions granted to that system. By finding ways of injecting malicious scripts into web pages, an attacker can gain elevated access-privileges to sensitive page content, to session cookies, and to

5293-410: The policy only allows trustworthy scripts and disallows dynamic code loading , the browser will not run programs from untrusted authors regardless of the HTML document's structure. Modern CSP policies allow using nonces to mark scripts in the HTML document as safe to run instead of keeping the policy entirely separate from the page content. As long as trusted nonces only appear on trustworthy scripts,

5372-450: The protocol. Many current email users do not run MTA, MDA or MUA programs themselves, but use a web-based email platform, such as Gmail or Yahoo! Mail , that performs the same tasks. Such webmail interfaces allow users to access their mail with any standard web browser , from any computer, rather than relying on a local email client. Upon reception of email messages, email client applications save messages in operating system files in

5451-400: The real names of the people she sees on the site. To do so, she writes a script designed to run from other users' browsers when they visit her profile. The script then sends a quick message to her own server, which collects this information. To do this, for the question "Describe your Ideal First Date", Mallory gives a short answer (to appear normal), but the text at the end of her answer

5530-454: The recipient. In addition to this example, alternatives and complications exist in the email system: Many MTAs used to accept messages for any recipient on the Internet and do their best to deliver them. Such MTAs are called open mail relays . This was very important in the early days of the Internet when network connections were unreliable. However, this mechanism proved to be exploitable by originators of unsolicited bulk email and as

5609-705: The separator character ":", and a value ("field body" or "header field body"). Each field name begins in the first character of a new line in the header section, and begins with a non- whitespace printable character . It ends with the separator character ":". The separator is followed by the field value (the "field body"). The value can continue onto subsequent lines if those lines have space or tab as their first character. Field names and, without SMTPUTF8 , field bodies are restricted to 7-bit ASCII characters. Some non-ASCII values may be represented using MIME encoded words . Email header fields can be multi-line, with each line recommended to be no more than 78 characters, although

5688-506: The standard for Internet email for decades. Published in 1982, RFC 822 was based on the earlier RFC 733 for the ARPANET. Internet email messages consist of two sections, "header" and "body". These are known as "content". The header is structured into fields such as From, To, CC, Subject, Date, and other information about the email. In the process of transporting email messages between systems, SMTP communicates delivery parameters and information using message header fields. The body contains

5767-399: The untrusted string needs to be placed within an HTML document including HTML entity encoding, JavaScript escaping, CSS escaping, and URL (or percent) encoding . Most web applications that do not need to accept rich data can use escaping to largely eliminate the risk of XSS attacks in a fairly straightforward manner. Performing HTML entity encoding only on the five XML significant characters

5846-442: The user input needs to be rendered as HTML by the browser (so it shows as " very large", instead of "<b>very</b> large"). Stopping an XSS attack when accepting HTML input from users is much more complex in this situation. Untrusted HTML input must be run through an HTML sanitization engine to ensure that it does not contain XSS code. Many validations rely on parsing out (blacklisting) specific "at risk" HTML tags such as

5925-434: The web or check their Facebook accounts, making email the most popular activity for users to do on their smartphones. 78% of the respondents in the study revealed that they check their email on their phone. It was also found that 30% of consumers use only their smartphone to check their email, and 91% were likely to check their email at least once per day on their smartphone. However, the percentage of consumers using email on

6004-563: The web server. Rather, it is being reflected by the JavaScript code, fully on the client side. An example of a DOM-based XSS vulnerability is the bug found in 2011 in a number of jQuery plugins. Prevention strategies for DOM-based XSS attacks include very similar measures to traditional XSS prevention strategies but implemented in JavaScript code and contained in web pages (i.e. input validation and escaping). Some JavaScript frameworks have built-in countermeasures against this and other types of attack — for example AngularJS . Self-XSS

6083-448: Was conceived in the late–20th century as the digital version of, or counterpart to, mail (hence e- + mail ). Email is a ubiquitous and very widely used communication medium; in current use, an email address is often treated as a basic and necessary part of many processes in business, commerce, government, education, entertainment, and other spheres of daily life in most countries. Email operates across computer networks , primarily

6162-428: Was extended by MIME to carry text in expanded character sets and multimedia content such as images. International email , with internationalized email addresses using UTF-8 , is standardized but not widely adopted. The term electronic mail has been in use with its modern meaning since 1975, and variations of the shorter E-mail have been in use since 1979: The service is often simply referred to as mail , and

6241-554: Was like the VCR , vinyl records and film cameras —no longer cool and something older people do. A 2015 survey of Android users showed that persons 13 to 24 used messaging apps 3.5 times as much as those over 45, and were far less likely to use email. Email messages may have one or more attachments, which are additional files that are appended to the email. Typical attachments include Microsoft Word documents, PDF documents, and scanned images of paper documents. In principle, there

#126873