GHSA-HXHM-96PP-2M43

Vulnerability from github – Published: 2020-01-24 15:27 – Updated: 2021-01-08 20:33
VLAI?
Summary
Remote Code Execution in Angular Expressions
Details

Impact

The vulnerability, reported by GoSecure Inc, allows Remote Code Execution, if you call expressions.compile(userControlledInput) where userControlledInput is text that comes from user input.

  • If running angular-expressions in the browser, an attacker could run any browser script when the application code calls expressions.compile(userControlledInput).
  • If running angular-expressions on the server, an attacker could run any Javascript expression, thus gaining Remote Code Execution.

Patches

Users should upgrade to version 1.0.1 of angular-expressions

Workarounds

A temporary workaround might be either to :

  • disable user-controlled input that will be fed into angular-expressions in your application

OR

  • allow only following characters in the userControlledInput :
if (/^[|a-zA-Z.0-9 :"'+-?]+$/.test(userControlledInput)) {
      var result = expressions.compile(userControlledInput);
}
else {
     result = undefined;
}

References

Removal of angular-expression sandbox

For more information

If you have any questions or comments about this advisory: * Open an issue in angular-expressions * Email us

Credits

The issue was reported by Maxime Nadeau from GoSecure, Inc.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "angular-expressions"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.0.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2020-5219"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-74"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-01-24T15:27:04Z",
    "nvd_published_at": null,
    "severity": "HIGH"
  },
  "details": "### Impact\n\nThe vulnerability, reported by GoSecure Inc, allows Remote Code Execution, if you call `expressions.compile(userControlledInput)` where `userControlledInput` is text that comes from user input.\n\n* If running angular-expressions in the browser, an attacker could run any browser script when the application code calls expressions.compile(userControlledInput).\n* If running angular-expressions on the server, an attacker could run any Javascript expression, thus gaining Remote Code Execution.\n\n### Patches\n\nUsers should upgrade to version 1.0.1 of angular-expressions\n\n### Workarounds\n\nA temporary workaround might be either to : \n\n* disable user-controlled input that will be fed into angular-expressions in your application\n\nOR\n\n* allow only following characters in the userControlledInput : \n\n```js\nif (/^[|a-zA-Z.0-9 :\"\u0027+-?]+$/.test(userControlledInput)) {\n      var result = expressions.compile(userControlledInput);\n}\nelse {\n     result = undefined;\n}\n```\n\n### References\n\n[Removal of angular-expression sandbox](http://blog.angularjs.org/2016/09/angular-16-expression-sandbox-removal.html)\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [angular-expressions](https://github.com/peerigon/angular-expressions/issues)\n* [Email us](mailto:contact@javascript-ninja.fr)\n\n### Credits \n\nThe issue was reported by Maxime Nadeau from GoSecure, Inc.",
  "id": "GHSA-hxhm-96pp-2m43",
  "modified": "2021-01-08T20:33:38Z",
  "published": "2020-01-24T15:27:25Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/peerigon/angular-expressions/security/advisories/GHSA-hxhm-96pp-2m43"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2020-5219"
    },
    {
      "type": "WEB",
      "url": "https://github.com/peerigon/angular-expressions/commit/061addfb9a9e932a970e5fcb913d020038e65667"
    },
    {
      "type": "WEB",
      "url": "http://blog.angularjs.org/2016/09/angular-16-expression-sandbox-removal.html"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Remote Code Execution in Angular Expressions"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…