NodeJS/angular/1.2.18
HTML enhanced for web apps
https://www.npmjs.com/package/angular
MIT
9 Security Vulnerabilities
Cross-Site Scripting via JSONP
JSONP allows untrusted resource URLs, which provides a vector for attack by malicious actors.
angular vulnerable to regular expression denial of service via the $resource service
- https://nvd.nist.gov/vuln/detail/CVE-2023-26117
- https://security.snyk.io/vuln/SNYK-JS-ANGULAR-3373045
- https://stackblitz.com/edit/angularjs-vulnerability-resource-trailing-slashes-redos
- https://github.com/advisories/GHSA-2qqx-w9hr-q5gx
- https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWER-5406323
- https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWERGITHUBANGULAR-5406325
- https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-5406324
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OQWJLE5WE33WNMA54XSJIDXBRK2KL3XJ/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UDKFLKJ6VZKL52AFVW2OVZRMJWHMW55K/
All versions of the package angular are vulnerable to Regular Expression Denial of Service (ReDoS) via the $resource service due to the usage of an insecure regular expression. Exploiting this vulnerability is possible by a large carefully-crafted input, which can result in catastrophic backtracking.
angular vulnerable to regular expression denial of service via the angular.copy() utility
- https://nvd.nist.gov/vuln/detail/CVE-2023-26116
- https://security.snyk.io/vuln/SNYK-JS-ANGULAR-3373044
- https://stackblitz.com/edit/angularjs-vulnerability-angular-copy-redos
- https://github.com/advisories/GHSA-2vrf-hf26-jrp5
- https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWER-5406320
- https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWERGITHUBANGULAR-5406322
- https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-5406321
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OQWJLE5WE33WNMA54XSJIDXBRK2KL3XJ/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UDKFLKJ6VZKL52AFVW2OVZRMJWHMW55K/
All versions of the package angular are vulnerable to Regular Expression Denial of Service (ReDoS) via the angular.copy() utility function due to the usage of an insecure regular expression. Exploiting this vulnerability is possible by a large carefully-crafted input, which can result in catastrophic backtracking.
XSS via JQLite DOM manipulation functions in AngularJS
- https://github.com/google/security-research/security/advisories/GHSA-5cp4-xmrw-59wf
- https://github.com/advisories/GHSA-5cp4-xmrw-59wf
- https://github.com/jquery/jquery/security/advisories/GHSA-gxr4-xjj5-5px2
- https://github.com/jquery/jquery/security/advisories/GHSA-jpcq-cgw6-v4j6
- https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/
- https://github.com/advisories/GHSA-mhp6-pxh8-r675
- https://snyk.io/vuln/SNYK-JS-ANGULAR-570058
Summary
XSS may be triggered in AngularJS applications that sanitize user-controlled HTML snippets before passing them to JQLite
methods like JQLite.prepend
, JQLite.after
, JQLite.append
, JQLite.replaceWith
, JQLite.append
, new JQLite
and angular.element
.
Description
JQLite (DOM manipulation library that's part of AngularJS) manipulates input HTML before inserting it to the DOM in jqLiteBuildFragment
.
One of the modifications performed expands an XHTML self-closing tag.
If jqLiteBuildFragment
is called (e.g. via new JQLite(aString)
) with user-controlled HTML string that was sanitized (e.g. with DOMPurify), the transformation done by JQLite may modify some forms of an inert, sanitized payload into a payload containing JavaScript - and trigger an XSS when the payload is inserted into DOM.
This is similar to a bug in jQuery htmlPrefilter
function that was fixed in 3.5.0.
Proof of concept
const inertPayload = `<div><style><style/><img src=x onerror="alert(1337)"/>`
Note that the style element is not closed and <img
would be a text node inside the style if inserted into the DOM as-is.
As such, some HTML sanitizers would leave the <img
as is without processing it and stripping the onerror
attribute.
angular.element(document).append(inertPayload);
This will alert, as <style/>
will be replaced with <style></style>
before adding it to the DOM, closing the style element early and reactivating img
.
Patches
The issue is patched in JQLite
bundled with angular 1.8.0. AngularJS users using JQuery should upgrade JQuery to 3.5.0, as a similar vulnerability affects jQuery <3.5.0.
Workarounds
Changing sanitizer configuration not to allow certain tag grouping (e.g. <option><style></option>
) or inline style elements may stop certain exploitation vectors, but it's uncertain if all possible exploitation vectors would be covered. Upgrade of AngularJS to 1.8.0 is recommended.
References
https://github.com/advisories/GHSA-mhp6-pxh8-r675 https://github.com/jquery/jquery/security/advisories/GHSA-gxr4-xjj5-5px2 https://github.com/jquery/jquery/security/advisories/GHSA-jpcq-cgw6-v4j6 https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/ https://snyk.io/vuln/SNYK-JS-ANGULAR-570058
Prototype Pollution in angular
- https://nvd.nist.gov/vuln/detail/CVE-2019-10768
- https://github.com/advisories/GHSA-89mq-4x47-5v83
- https://github.com/angular/angular.js/commit/add78e62004e80bb1e16ab2dfe224afa8e513bc3
- https://snyk.io/vuln/SNYK-JS-ANGULAR-534884
- https://lists.apache.org/thread.html/rca37935d661f4689cb4119f1b3b224413b22be161b678e6e6ce0c69b@%3Ccommits.nifi.apache.org%3E
- https://github.com/angular/angular.js/pull/16913
- https://www.npmjs.com/advisories/1343
Versions of angular
prior to 1.7.9 are vulnerable to prototype pollution. The deprecated API function merge()
does not restrict the modification of an Object's prototype in the , which may allow an attacker to add or modify an existing property that will exist on all objects.
Recommendation
Upgrade to version 1.7.9 or later. The function was already deprecated and upgrades are not expected to break functionality.
Cross site scripting in Angular
- https://nvd.nist.gov/vuln/detail/CVE-2020-7676
- https://github.com/advisories/GHSA-mhp6-pxh8-r675
- https://github.com/angular/angular.js/pull/17028
- https://snyk.io/vuln/SNYK-JS-ANGULAR-570058
- https://github.com/angular/angular.js/pull/17028,
- https://lists.apache.org/thread.html/r198985c02829ba8285ed4f9b1de54a33b5f31b08bb38ac51fc86961b@%3Cozone-issues.hadoop.apache.org%3E
- https://lists.apache.org/thread.html/r3f05cfd587c774ea83c18e59eda9fa37fa9bbf3421484d4ee1017a20@%3Cozone-issues.hadoop.apache.org%3E
- https://lists.apache.org/thread.html/r446c297cd6cda2bd7e345c9b0741d7f611df89902e5d515848c6f4b1@%3Cozone-issues.hadoop.apache.org%3E
- https://lists.apache.org/thread.html/r455ebd83a1c69ae8fd897560534a079c70a483dbe1e75504f1ca499b@%3Cozone-issues.hadoop.apache.org%3E
- https://lists.apache.org/thread.html/r57383582dcad2305430321589dfaca6793f5174c55da6ce8d06fbf9b@%3Cozone-issues.hadoop.apache.org%3E
- https://lists.apache.org/thread.html/r79e3feaaf87b81e80da0e17a579015f6dcb94c95551ced398d50c8d7@%3Cozone-issues.hadoop.apache.org%3E
- https://lists.apache.org/thread.html/r80f210a5f4833d59c5d3de17dd7312f9daba0765ec7d4052469f13f1@%3Cozone-commits.hadoop.apache.org%3E
- https://lists.apache.org/thread.html/rb6423268b25db0f800359986867648e11dbd38e133b9383e85067f02@%3Cozone-issues.hadoop.apache.org%3E
- https://lists.apache.org/thread.html/rda99599896c3667f2cc9e9d34c7b6ef5d2bbed1f4801e1d75a2b0679@%3Ccommits.nifi.apache.org%3E
- https://lists.apache.org/thread.html/rfa2b19d01d10a8637dc319a7d5994c3dbdb88c0a8f9a21533403577a@%3Cozone-issues.hadoop.apache.org%3E
- https://github.com/angular/angular.js/commit/2df43c07779137d1bddf7f3b282a1287a8634acd
angular.js prior to 1.8.0 allows cross site scripting. The regex-based input HTML replacement may turn sanitized code into unsanitized one. Wrapping <option>
elements in <select>
ones changes parsing behavior, leading to possibly unsanitizing code.
Angular (deprecated package) Cross-site Scripting
- https://nvd.nist.gov/vuln/detail/CVE-2022-25869
- https://glitch.com/edit/%23%21/angular-repro-textarea-xss
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWER-2949783
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWERGITHUBANGULAR-2949784
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2949782
- https://snyk.io/vuln/SNYK-JS-ANGULAR-2949781
- https://github.com/advisories/GHSA-prc3-vjfx-vhm9
All versions of package angular are vulnerable to Cross-site Scripting (XSS) due to insecure page caching in the Internet Explorer browser, which allows interpolation of <textarea>
elements.
NPM package angular is deprecated. Those who want to receive security updates should use the actively maintained package @angular/core.
angular vulnerable to regular expression denial of service via the <input type="url"> element
- https://nvd.nist.gov/vuln/detail/CVE-2023-26118
- https://security.snyk.io/vuln/SNYK-JS-ANGULAR-3373046
- https://stackblitz.com/edit/angularjs-vulnerability-inpur-url-validation-redos
- https://github.com/advisories/GHSA-qwqh-hm9m-p5hr
- https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWER-5406326
- https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWERGITHUBANGULAR-5406328
- https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-5406327
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OQWJLE5WE33WNMA54XSJIDXBRK2KL3XJ/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UDKFLKJ6VZKL52AFVW2OVZRMJWHMW55K/
All versions of the package angular are vulnerable to Regular Expression Denial of Service (ReDoS) via the element due to the usage of an insecure regular expression in the input[url] functionality. Exploiting this vulnerability is possible by a large carefully-crafted input, which can result in catastrophic backtracking.
AngularJS Cross-site Scripting due to failure to sanitize `xlink.href` attributes
- https://nvd.nist.gov/vuln/detail/CVE-2019-14863
- https://github.com/advisories/GHSA-r5fx-8r73-v86c
- https://github.com/angular/angular.js/pull/12524
- https://github.com/angular/angular.js/commit/35a21532b73d5bd84b4325211c563e6a3e2dde82
- https://github.com/angular/angular.js/commit/f33ce173c90736e349cf594df717ae3ee41e0f7a
- https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2019-14863
- https://snyk.io/vuln/npm:angular:20150807
- https://www.npmjs.com/advisories/1453
Versions of angular
prior to 1.5.0-beta.1 are vulnerable to Cross-Site Scripting. The package fails to sanitize xlink:href
attributes, which may allow attackers to execute arbitrary JavaScript in a victim's browser if the value is user-controlled.
Recommendation
Upgrade to version 1.5.0-beta.1 or later.
144 Other Versions
Version | License | Security | Released | |
---|---|---|---|---|
1.2.22 | MIT | 9 | 2014-08-31 - 00:16 | over 9 years |
1.2.21 | MIT | 9 | 2014-08-11 - 21:02 | almost 10 years |
1.2.20 | MIT | 9 | 2014-08-11 - 21:00 | almost 10 years |
1.2.19 | MIT | 9 | 2014-07-02 - 01:50 | almost 10 years |
1.2.18 | MIT | 9 | 2014-06-19 - 19:57 | almost 10 years |
1.2.17 | MIT | 9 | 2014-06-19 - 19:57 | almost 10 years |
1.2.16 | MIT | 9 | 2014-04-18 - 01:09 | about 10 years |
1.2.15 | MIT | 9 | 2014-03-26 - 00:42 | about 10 years |
1.2.14 | MIT | 9 | 2014-03-26 - 00:41 | about 10 years |
1.2.13 | MIT | 9 | 2014-03-26 - 00:40 | about 10 years |
1.2.12 | MIT | 9 | 2014-03-26 - 00:40 | about 10 years |
1.2.11 | MIT | 9 | 2014-03-26 - 00:39 | about 10 years |
1.2.10 | MIT | 9 | 2014-01-27 - 18:24 | over 10 years |
1.2.9 | MIT | 9 | 2014-01-27 - 18:23 | over 10 years |
1.2.8 | MIT | 9 | 2014-01-27 - 18:20 | over 10 years |
1.2.7 | MIT | 9 | 2014-01-07 - 04:37 | over 10 years |
1.2.6 | MIT | 9 | 2014-01-07 - 04:36 | over 10 years |
1.2.5 | MIT | 9 | 2014-01-07 - 04:36 | over 10 years |
1.2.4 | MIT | 9 | 2014-01-07 - 04:36 | over 10 years |
1.2.3 | MIT | 9 | 2014-01-07 - 04:36 | over 10 years |
1.2.2 | MIT | 9 | 2013-11-23 - 21:43 | over 10 years |
1.2.1 | MIT | 9 | 2013-11-23 - 21:41 | over 10 years |
1.2.0 | MIT | 9 | 2013-11-23 - 21:40 | over 10 years |
1.1.5 | MIT | 9 | 2013-11-23 - 21:39 | over 10 years |
1.1.4 | MIT | 9 | 2013-11-23 - 21:38 | over 10 years |
1.1.3 | MIT | 9 | 2013-11-23 - 21:37 | over 10 years |
1.1.2 | MIT | 9 | 2013-11-23 - 21:36 | over 10 years |
1.1.1 | MIT | 9 | 2013-11-23 - 21:35 | over 10 years |
1.1.0 | MIT | 9 | 2013-11-23 - 21:35 | over 10 years |
1.0.8 | MIT | 9 | 2013-11-23 - 21:33 | over 10 years |
1.0.7 | MIT | 9 | 2013-11-23 - 21:32 | over 10 years |
1.0.6 | MIT | 9 | 2013-11-23 - 21:32 | over 10 years |
1.0.5 | MIT | 9 | 2013-11-23 - 21:31 | over 10 years |
1.0.4 | MIT | 9 | 2013-11-23 - 21:30 | over 10 years |
1.0.3 | MIT | 9 | 2013-11-23 - 21:29 | over 10 years |
1.0.2 | MIT | 9 | 2013-11-23 - 21:28 | over 10 years |
1.0.1 | MIT | 9 | 2013-11-23 - 21:22 | over 10 years |
1.0.0 | MIT | 9 | 2013-11-23 - 21:21 | over 10 years |
0.0.4 | MIT | 9 | 2012-12-11 - 18:19 | over 11 years |
0.0.3 | MIT | 9 | 2012-10-28 - 18:35 | over 11 years |
0.0.2 | MIT | 9 | 2012-07-16 - 09:23 | almost 12 years |
0.0.1 | MIT | 9 | 2012-03-28 - 11:40 | about 12 years |
0.0.1-2 | MIT | 9 | 2012-03-31 - 21:22 | about 12 years |
0.0.1-1 | MIT | 9 | 2012-03-29 - 01:29 | about 12 years |