Security Advisories (12)
CVE-2018-14041 (2018-07-13)

In Bootstrap before 4.1.2, XSS is possible in the data-target property of scrollspy.

CVE-2018-14042 (2018-07-13)

In Bootstrap before 4.1.2, XSS is possible in the data-container property of tooltip.

CVE-2020-11022 (2020-04-29)

In jQuery versions greater than or equal to 1.2 and before 3.5.0, passing HTML from untrusted sources - even after sanitizing it - to one of jQuery's DOM manipulation methods (i.e. .html(), .append(), and others) may execute untrusted code. This problem is patched in jQuery 3.5.0.

CVE-2020-11023 (2020-04-29)

In jQuery versions greater than or equal to 1.0.3 and before 3.5.0, passing HTML containing <option> elements from untrusted sources - even after sanitizing it - to one of jQuery's DOM manipulation methods (i.e. .html(), .append(), and others) may execute untrusted code. This problem is patched in jQuery 3.5.0.

CVE-2019-11358 (2019-04-20)

jQuery before 3.4.0, as used in Drupal, Backdrop CMS, and other products, mishandles jQuery.extend(true, {}, ...) because of Object.prototype pollution. If an unsanitized source object contained an enumerable __proto__ property, it could extend the native Object.prototype.

CVE-2015-9251 (2018-01-18)

jQuery before 3.0.0 is vulnerable to Cross-site Scripting (XSS) attacks when a cross-domain Ajax request is performed without the dataType option, causing text/javascript responses to be executed.

CVE-2011-4969 (2013-03-08)

Cross-site scripting (XSS) vulnerability in jQuery before 1.6.3, when using location.hash to select elements, allows remote attackers to inject arbitrary web script or HTML via a crafted tag.

CVE-2012-6708 (2018-01-18)

jQuery before 1.9.0 is vulnerable to Cross-site Scripting (XSS) attacks. The jQuery(strInput) function does not differentiate selectors from HTML in a reliable fashion. In vulnerable versions, jQuery determined whether the input was HTML by looking for the '<' character anywhere in the string, giving attackers more flexibility when attempting to construct a malicious payload. In fixed versions, jQuery only deems the input to be HTML if it explicitly starts with the '<' character, limiting exploitability only to attackers who can control the beginning of a string, which is far less common.

CVE-2020-7656 (2020-05-19)

jquery prior to 1.9.0 allows Cross-site Scripting attacks via the load method. The load method fails to recognize and remove "<script>" HTML tags that contain a whitespace character, i.e: "</script >", which results in the enclosed script logic to be executed.

CVE-2019-5428

Prototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as _proto_, constructor and prototype. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the Object.prototype are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.

CVE-2014-6071 (2018-01-16)

jQuery 1.4.2 allows remote attackers to conduct cross-site scripting (XSS) attacks via vectors related to use of the text method inside after.

CVE-2018-14040 (2018-07-13)

Prototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as _proto_, constructor and prototype. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the Object.prototype are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.

NAME

YATT::Lite::LRXML::Syntax - Loose but Recursive XML (LRXML) format.

SYNOPSIS

require YATT::Lite::LRXML;
my $container = YATT::Lite::LRXML->load_from(string => <<'END');
<!yatt:args x y>
<h2>&yatt:x;</h2>
&yatt:y;

<!yatt:widget foo id x>
<div id="&yatt:id;">
  &yatt:x;
</div>
END

DESCRIPTION

Loose but Recursive XML (LRXML), which I'm defining here, is an XML-like template format. LRXML is first used in my template engine YATT and then extended in my latest template engine YATT::Lite.

LRXML format consists of 3 layers of syntax definitions which are "LRXML multipart container" (or simply container), "LRXML template" (template) and "LRXML entity reference" (entref). A container can carry multiple parts. Each part can have a boundary (header) and it can carry meta information (usually used as a declaration) for the body of the part. Each part can be a template or other type of text payload. Entref can appear in templates and other text payload.

LRXML format only defines syntax and doesn't touch semantics, like S-expression in Lisp. Actually, the current implementation of LRXML parser determines the types of each part by (predefined) declaration keywords (such as "widget", "page", "action"...), but the declaration keywords are not part of this LRXML format specification. It is opened for each user of LRXML format.

XXX: Brief introduction of LRXML

FORMAT SPECIFICATION

Syntax Notation (ABNF with negative-match)

In this document, I (roughly) use ABNF, with some modifications/extensions.

[..] means a character set, like regexp in perl5.

In original ABNF, [..] means optional element.

The operator "?" is equivalent of *1 and indicates optional element.

For optional element, I chose ?<elem> instead of [<elem>].

The operator " ¬ " preceding an element indicates negative-match.

If an element is written like:

¬ elem

then this pattern matches longest possible character sequence which do not match elem. This operator helps defining customizable namespace.

Rule can take parameters.

If left-hand-side of a rule definition consists of two or more words, it is a parametric rule. Parametric rule is used like <rule Param>.

group C          =  *term C

...other rule... =   <group ")">

Customizable namespace qualifier

In LRXML, every top-level constructs are marked by namespace qualifier (or simply namespace). Namespace can be customized to arbitrary set of words. For simplicity, in this document, I put a "sample" definition of customizable namespace rule CNS like:

CNS             = ("yatt")

But every implementation of LRXML parser should allow overriding this rule like following instead:

CNS             = ("yatt" / "js" / "perl")

BNF of LRXML multipart container

lrxml-container = ?(lrxml-payload) *( lrxml-boundary lrxml-payload
                                    / lrxml-comment )

lrxml-boundary  = "<!" CNS ":" NSNAME decl-attlist ">" EOL

lrxml-comment   = "<!--#" CNS *comment-payload "-->"

lrxml-payload   = ¬("<!" (CNS ":" / "#" CNS))

decl-attlist    = *(1*WS / inline-comment / att-pair / decl-macro)

inline-comment  = "--" comment-payload "--"

comment-payload = *([^-] / "-" [^-])

decl-macro      = "%" NAME *[0-9A-Za-z_:\.\-=\[\]\{\}\(,\)] ";"

att-pair        = ?(NSNAME "=") att-value

att-value       = squoted-att / dquoted-att / nested-att / bare-att

squoted-att     = ['] *[^'] [']

dquoted-att     = ["] *[^"] ["]

nested-att      = '[' decl-attlist ']'

bare-att        = 1*[^'"\[\]\ \t\n<>/=]

NSNAME          = NAME *(":" NAME)

NAME            = 1*[0-9A-Za-z_]

WS              = [\ \t\n]

EOL             = ?[\r] [\n]

Some notes on current spec and future changes:

NAME may allowed to contain unicode word.

In current YATT::Lite, NAME can cotain \w in perl unicode semantics.

BNF of LRXML template syntax .

  lrxml-template   = ?(template-payload) *( (lrxml-entref / template-tag)
                                           ?(template-payload) )

  template-payload = ¬( "<" (CNS ":" / "?" CNS)
                      / "&" (CNS [:#| / special-entity)
		      )

  template-tag     = element / pi

  element          = "<" (single-elem / open-tag / close-tag) ">"

  pi               = "<?" CNS ?NSNAME pi-payload "?>"

  single-elem      = CNS NSNAME elem-attlist "/"

  open-tag         = CNS NSNAME elem-attlist

  close-tag        =  "/" CNS NSNAME *WS

  elem-attlist     = *(1*WS / inline-comment / att-pair)

  pi-payload       = *([^?] / "?" [^>])

BNF of LRXML entity reference syntax

lrxml-entref     = "&" ( CNS (pipeline / lcmsg)
                       / special-entity "(" <group ")">
                       )
                   ";"

pipeline         = 1*( ":" NAME ?( "(" <group ")">)
                     / "[" <group "]">
                     / "{" <group "}">
                     )

group CLO        = *ent-term CLO

ent-term         = ( ","
                   / ( etext / pipeline ) ?[,:]
                   )

etext            = etext-head *etext-body

etext-head       = ( ETEXT *( ETEXT / ":" )
                   / paren-quote
                   )

etext-body       = ( ETEXT *( ETEXT / ":" )
                   / paren-quote
                   / etext-any-group
                   )

etext-any-group  = ( "(" <etext-group ")">
                   / "{" <etext-group "}">
                   / "[" <etext-group "]">
                   )

etext-group CLO  = *( ETEXT / [:,] ) *etext-any-group CLO

paren-quote      = "(" *( [^()] / paren-quote ) ")"

lcmsg            = lcmsg-open / lcmsg-sep / lcmsg-close

lcmsg-open       = ?("#" NAME) 2*"["

lcmsg-sep        = 2*"|"

lcmsg-close      = 2*"]"

special-entity   = SPECIAL_ENTNAME

ETEXT            = [^\ \t\n,;:(){}\[\]]

Special entity name

Special entity is another customizable syntax element. For example, it is usually defined like:

SPECIAL_ENTNAME  = ("HTML")

And then you can write &HTML(:var);.

But every implementation of LRXML parser should allow overriding this rule like following instead:

SPECIAL_ENTNAME  = ("HTML" / "JSON" / "DUMP")

AUTHOR

"KOBAYASI, Hiroaki" <hkoba@cpan.org>

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.