# CVE-2021-41097: Prototype pollution in aurelia-path

> Prototype pollution in aurelia-path allows attackers to modify Object prototypes via crafted URLs, potentially leading to code execution or privilege escalation in Aurelia applications.

- **Severity:** Critical 9.1 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 27 Sep 2021
- **Updated:** 4 Aug 2024
- **Also known as:** GHSA-3c9c-2p65-qvwv

## What is CVE-2021-41097?

CVE-2021-41097 is a critical vulnerability in aurelia path, published on 27 Sep 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

aurelia-path is part of the Aurelia platform and contains utilities for path manipulation. There is a prototype pollution vulnerability in aurelia-path before version 1.1.7. The vulnerability exposes Aurelia application that uses `aurelia-path` package to parse a string. The majority of this will be Aurelia applications that employ the `aurelia-router` package. An example is this could allow an attacker to change the prototype of base object class `Object` by tricking an application to parse the following URL: `https://aurelia.io/blog/?__proto__[asdf]=asdf`. The problem is patched in version `1.1.7`.

Weakness: CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes)

## Which versions are affected by CVE-2021-41097?

2 open source packages ship an affected version, including aurelia-path. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `aurelia-path` | npm | All versions | 1.1.7 |
| `aurelia-path` | npm | All versions | 1.1.7 |

Products: Bluespire Aurelia-Path.

## How do I fix CVE-2021-41097?

Upgrade aurelia-path to 1.1.7 or later.

## Is CVE-2021-41097 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-41097 exists.

Public exploit code:

- Aurelia-Path < 1.1.7 - Prototype Pollution (nuclei): http/cves/2021/CVE-2021-41097.yaml

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-41097 and fix it if it is affected.

What it is: CVE-2021-41097 is a critical vulnerability in aurelia path, published on 27 Sep 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-41097 exists.

Affected packages and fixed versions:
- aurelia-path (npm): affected all versions; fixed in 1.1.7
- aurelia-path (npm): affected all versions; fixed in 1.1.7

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2021-41097/ (Markdown: https://insights.sbomify.com/CVE-2021-41097/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2021-41097
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2021-41097
- OSV: https://osv.dev/vulnerability/CVE-2021-41097

---
From sbomify Insights: https://insights.sbomify.com/CVE-2021-41097/
Summaries are generated and may contain mistakes; the official description above is the record.
