Arbitrary Code Execution Affecting org.webjars.npm:angular package, versions [,1.4.0)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    Exploit Maturity
    Proof of concept

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-JAVA-ORGWEBJARSNPM-479391
  • published 23 Jan 2017
  • disclosed 9 Mar 2015
  • credit Rodric Haddad

Introduced: 9 Mar 2015

CVE NOT AVAILABLE CWE-78 Open this link in a new tab

How to fix?

Upgrade org.webjars.npm:angular to version 1.4.0 or higher.

Overview

org.webjars.npm:angular is a WebJar for angular.

Affected versions of this package are vulnerable to Arbitrary Code Execution via unsafe svg animation tags.

Details

Exploit Example:

<svg>
  <a xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="?">
    <circle r="400"></circle>
    <animate attributeName="xlink:href" begin="0" from="javascript:alert(1)" to="&" />
  </a>
</svg>

Here the anchor's href is animated, starting from a value that's a javascript URI. This allows execution of arbitrary javascript in the process. Preventing only the animation of links is tricky, as SVG is weird and namespaces aren't predictable. The fix is to have the sanitizer filter out svg animation tags instead.

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
7.4 high
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    High
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    High
  • Integrity (I)
    High
  • Availability (A)
    None