CVE-2021-21277

Angular Expressions - Remote Code Execution

Description

angular-expressions is "angular's nicest part extracted as a standalone module for the browser and node". In angular-expressions before version 1.1.2 there is a vulnerability which allows Remote Code Execution if you call "expressions.compile(userControlledInput)" where "userControlledInput" is text that comes from user input. The security of the package could be bypassed by using a more complex payload, using a ".constructor.constructor" technique. In terms of impact: 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. This is fixed in version 1.1.2 of angular-expressions 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.

Categories

8.5
CVSS
Severity: High
CVSS 3.1 •
CVSS 2.0 •
EPSS 0.72% Top 30%
Vendor Advisory angularjs.org Vendor Advisory github.com
Affected: peerigon angular-expressions
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2021-21277?
CVE-2021-21277 has been scored as a high severity vulnerability.
How to fix CVE-2021-21277?
To fix CVE-2021-21277, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2021-21277 being actively exploited in the wild?
As for now, there are no information to confirm that CVE-2021-21277 is being actively exploited. According to its EPSS score, there is a ~1% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2021-21277?
CVE-2021-21277 affects peerigon angular-expressions.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.