Back to skill

Security audit

PlayCanvas

Security checks for vulnerabilities and agentic risk

Overview

This is a documentation-only PlayCanvas guide that is coherent and not self-executing, though users should be careful with token, API, npm, npx, and CDN examples.

Reasonable to install as PlayCanvas reference material. Before running copied commands or API snippets, pin package and CDN versions, use a clean project or branch, keep PlayCanvas access tokens out of shell history and logs, and explicitly confirm any delete, force, merge, publish, or editor-automation action.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
Findings (5)

T08 · Insecure Dependencies

Warning
Location
references/react.md:20
Finding

Mutable PlayCanvas Project Scaffolder Executed Through npm

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
references/scripting.md:439
Finding

Unpinned Codemod Can Execute Remote Code and Rewrite Project Sources

Content
View full analysis
Remediation
View remediation
-- codemod playcanvas-esm-scripts ``` - Confirm the exact official package and invocation syntax from the linked PlayCanvas repository. - Install the tool as a locked development dependency instead of downloading it at invocation time. - Commit or back up the project before migration. - Run the codemod in a disposable branch or sandbox with unnecessary credentials removed. - Review the complete source diff before committing, building, or deploying migrated code. ]]>

T08 · Insecure Dependencies

Note
Location
references/editor-publishing-web.md:21
Finding

Unpinned HTTP Server Package Executed Through npx

Content
View full analysis
Remediation
View remediation
-- http-server -a 127.0.0.1 -p 8000 -c-1 ``` - Bind explicitly to `127.0.0.1` unless remote access is required. - Enable CORS only when the tested application requires it. - Prefer a project-local, lockfile-controlled development server. - Do not run the server from a directory containing secrets or unrelated private files. ]]>

T03 · Remote Payload Retrieval and Execution

Warning
Location
references/web-components.md:54
Finding

Mutable CDN JavaScript Loaded Directly Into the Application Origin

Content
View full analysis
{ "imports": { "playcanvas": "https://cdn.jsdelivr.net/npm/playcanvas@latest/build/playcanvas.mjs" } } ``` The boilerplate repeats the same mutable imports: ```html ``` ### Technical Analysis Both JavaScript modules are loaded from external URLs containing the mutable `@latest` tag. The code executed by a deployed page can therefore change without any modification to the application's source repository. Remote module scripts execute with the page's origin privileges. Depending on the host application, they may access the DOM, same-origin application data, browser storage, authenticated APIs, and user input. The examples provide no immutable version pin, content hash, or equivalent verification control. Subresource Integrity is not straightforward for modules reached through an import map, so version pinning and controlled self-hosting are particularly important. ### Attack Path 1. An attacker compromises a referenced npm package, publisher account, release pipeline, or relevant CDN delivery path. 2. Malicious code is published under the version selected by `@latest`. 3. A browser visits an application built from the documented boilerplate. 4. The browser downloads the changed module directly from jsDelivr. 5. The module executes in the application's origin. 6. It can manipulate the page, alter rendered content, capture application data available t ...[truncated 552 chars]
Remediation
View remediation
{ "imports": { "playcanvas": "https://cdn.jsdelivr.net/npm/playcanvas@/build/playcanvas.mjs" } } ``` - Prefer installing both dependencies locally, locking them with a package lockfile, and serving reviewed build artifacts from the application's own origin. - Use a restrictive Content Security Policy that permits scripts only from explicitly approved origins. - Monitor dependency advisories and update pinned versions through a reviewed change process. - Where technically supported, use cryptographic integrity verification for externally hosted entry-point resources. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
references/api.md:9
Finding

Realistic Bearer Token Literal Embedded in API Documentation

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (41)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/api.md (reported line 4)May include surrounding context.

md
# REST API

## Authorization {#authorization}
You can only access the REST API via https. In order to access the REST API you need to use an Access Token. You can generate an Access Token by going to your Organization's Account page.
In the API Tokens section click on Generate Token.
Give your token a name and click the button to create your new token. A new window will appear showing you your new access token.
Make sure you note that down because you will not be able to see the token once you close this window. This token is meant to be kept secret so do not share it with anyone other than your team (for example do not post this on forums).

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/api.md (reported line 6)May include surrounding context.

md
## Authorization {#authorization}
You can only access the REST API via https. In order to access the REST API you need to use an Access Token. You can generate an Access Token by going to your Organization's Account page.
In the API Tokens section click on Generate Token.
Give your token a name and click the button to create your new token. A new window will appear showing you your new access token.
Make sure you note that down because you will not be able to see the token once you close this window. This token is meant to be kept secret so do not share it with anyone other than your team (for example do not post this on forums).
From your Account page you can also Revoke all the tokens you have generated or a specific one. You can also edit the name of a token.
When you make calls to the API you must set the 'Authorization' header in your HTTP request to this value:

Credential Access

High
Category
Privilege Escalation
Confidence
89% confidence
Finding

The documentation includes what appears to be a concrete bearer token value in a curl example rather than an obviously fake placeholder. Even if intended as illustrative, realistic token-like secrets in docs can be copied, scraped, or mistakenly treated as valid credentials, leading to credential exposure risk.

Content

Scanner excerpt · references/api.md (reported line 13)May include surrounding context.

none
Bearer [access_token]

Replace [access_token] with an Access Token you generated in your Account page. For example:

none
curl -H "Authorization: Bearer nesgdxhiqe7hylfilr6ss1rds0gq1uj8" https://playcanvas.com/api/...

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/api.md (reported line 121)May include surrounding context.

md
Updatable fields: `name`, `tags`, `preload`, `data`, `folder_id`.
Normal rate limit. Errors: 401, 403, 404, 429.
## Delete Asset
`DELETE /api/assets/:id`
**Query params:** `force` (boolean) — required if asset has references.
Normal rate limit. Errors: 401, 403, 404, 409 (has references), 429.
## Upload Asset File

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/web-components.md (reported line 8)May include surrounding context.

What Are Web Components?

Web Components are reusable custom HTML elements that encapsulate complex functionality behind a simple, declarative interface. PlayCanvas Web Components wrap the full power of the PlayCanvas Engine in easy-to-use HTML tags, making 3D development accessible to web developers of all skill levels.

html
<!-- Create a 3D scene with just HTML -->
<pc-app>
  <pc-scene>
    <pc-entity name="camera" position="0 0 3">

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · references/api.md (reported line 49)May include surrounding context.

}

text
As you can notice the response in this case also contains pagination data. To control the pagination of the response you can pass the following URL parameters:
| Name    | Description                                                                                                                      |
| ------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `limit` | The maximum number of items to include in the response.                                                                          |
| `skip`  | The number of items to skip from the original result set.                                                                        |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · references/api.md (reported line 75)May include surrounding context.

md
| Strict          | The strict rate limit     | 5 requests/minute       | 10 requests/minute              |
| Assets          | The assets rate limit     | 60 requests/minute      | 120 requests/minute             |
The response will contain the following headers to help you regulate how often you call the API:
| Name                    | Description                                                                                                             |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `X-RateLimit-Limit`     | The number of requests allowed in a minute.                                                                             |
| `X-RateLimit-Remaining` | The remaining number of requests that you are allowed to make this minute.                                              |

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file documents a DELETE endpoint for removing assets, including a force parameter for referenced assets, but provides no warning about data loss or irreversibility. For markdown files, destructive behaviors that could affect user data should include an explicit warning to users.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/assets.md (reported line 39)May include surrounding context.

md
The Editor has a user accessible API that is currently in beta which can be used to help automate and extend the base functionality.
The API is not yet considered stable and may change in the future as we continue development. However, it is unlikely that API will change a lot from its current state.
The Editor API is open sourced on [GitHub](https://github.com/playcanvas/editor-api). The API documentation can be found [here](https://api.playcanvas.com/editor/).
## Automation Example
The API can be accessed via the browser's devtools console allowing for automation of repetitive tasks. In the example below, we are using the Editor to find all the Entities that have the tag 'red' and disabling them by running code in the browser console.
Editor API code:

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/ecs.md (reported line 5)May include surrounding context.

md
The Editor has a user accessible API that is currently in beta which can be used to help automate and extend the base functionality.
The API is not yet considered stable and may change in the future as we continue development. However, it is unlikely that API will change a lot from its current state.
The Editor API is open sourced on [GitHub](https://github.com/playcanvas/editor-api). The API documentation can be found [here](https://api.playcanvas.com/editor/).
## Automation Example
The API can be accessed via the browser's devtools console allowing for automation of repetitive tasks. In the example below, we are using the Editor to find all the Entities that have the tag 'red' and disabling them by running code in the browser console.
Editor API code:

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/ecs.md (reported line 6)May include surrounding context.

md
The Editor has a user accessible API that is currently in beta which can be used to help automate and extend the base functionality.
The API is not yet considered stable and may change in the future as we continue development. However, it is unlikely that API will change a lot from its current state.
The Editor API is open sourced on [GitHub](https://github.com/playcanvas/editor-api). The API documentation can be found [here](https://api.playcanvas.com/editor/).
## Automation Example
The API can be accessed via the browser's devtools console allowing for automation of repetitive tasks. In the example below, we are using the Editor to find all the Entities that have the tag 'red' and disabling them by running code in the browser console.
Editor API code:

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/ecs.md (reported line 7)May include surrounding context.

md
The Editor has a user accessible API that is currently in beta which can be used to help automate and extend the base functionality.
The API is not yet considered stable and may change in the future as we continue development. However, it is unlikely that API will change a lot from its current state.
The Editor API is open sourced on [GitHub](https://github.com/playcanvas/editor-api). The API documentation can be found [here](https://api.playcanvas.com/editor/).
## Automation Example
The API can be accessed via the browser's devtools console allowing for automation of repetitive tasks. In the example below, we are using the Editor to find all the Entities that have the tag 'red' and disabling them by running code in the browser console.
Editor API code:

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/ecs.md (reported line 13)May include surrounding context.

md
The Editor has a user accessible API that is currently in beta which can be used to help automate and extend the base functionality.
The API is not yet considered stable and may change in the future as we continue development. However, it is unlikely that API will change a lot from its current state.
The Editor API is open sourced on [GitHub](https://github.com/playcanvas/editor-api). The API documentation can be found [here](https://api.playcanvas.com/editor/).
## Automation Example
The API can be accessed via the browser's devtools console allowing for automation of repetitive tasks. In the example below, we are using the Editor to find all the Entities that have the tag 'red' and disabling them by running code in the browser console.
Editor API code:

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/ecs.md (reported line 15)May include surrounding context.

md
The Editor has a user accessible API that is currently in beta which can be used to help automate and extend the base functionality.
The API is not yet considered stable and may change in the future as we continue development. However, it is unlikely that API will change a lot from its current state.
The Editor API is open sourced on [GitHub](https://github.com/playcanvas/editor-api). The API documentation can be found [here](https://api.playcanvas.com/editor/).
## Automation Example
The API can be accessed via the browser's devtools console allowing for automation of repetitive tasks. In the example below, we are using the Editor to find all the Entities that have the tag 'red' and disabling them by running code in the browser console.
Editor API code:

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/ecs.md (reported line 16)May include surrounding context.

md
The Editor has a user accessible API that is currently in beta which can be used to help automate and extend the base functionality.
The API is not yet considered stable and may change in the future as we continue development. However, it is unlikely that API will change a lot from its current state.
The Editor API is open sourced on [GitHub](https://github.com/playcanvas/editor-api). The API documentation can be found [here](https://api.playcanvas.com/editor/).
## Automation Example
The API can be accessed via the browser's devtools console allowing for automation of repetitive tasks. In the example below, we are using the Editor to find all the Entities that have the tag 'red' and disabling them by running code in the browser console.
Editor API code:

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/ecs.md (reported line 17)May include surrounding context.

md
The Editor has a user accessible API that is currently in beta which can be used to help automate and extend the base functionality.
The API is not yet considered stable and may change in the future as we continue development. However, it is unlikely that API will change a lot from its current state.
The Editor API is open sourced on [GitHub](https://github.com/playcanvas/editor-api). The API documentation can be found [here](https://api.playcanvas.com/editor/).
## Automation Example
The API can be accessed via the browser's devtools console allowing for automation of repetitive tasks. In the example below, we are using the Editor to find all the Entities that have the tag 'red' and disabling them by running code in the browser console.
Editor API code:

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/ecs.md (reported line 18)May include surrounding context.

md
The Editor has a user accessible API that is currently in beta which can be used to help automate and extend the base functionality.
The API is not yet considered stable and may change in the future as we continue development. However, it is unlikely that API will change a lot from its current state.
The Editor API is open sourced on [GitHub](https://github.com/playcanvas/editor-api). The API documentation can be found [here](https://api.playcanvas.com/editor/).
## Automation Example
The API can be accessed via the browser's devtools console allowing for automation of repetitive tasks. In the example below, we are using the Editor to find all the Entities that have the tag 'red' and disabling them by running code in the browser console.
Editor API code:

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/ecs.md (reported line 19)May include surrounding context.

md
The Editor has a user accessible API that is currently in beta which can be used to help automate and extend the base functionality.
The API is not yet considered stable and may change in the future as we continue development. However, it is unlikely that API will change a lot from its current state.
The Editor API is open sourced on [GitHub](https://github.com/playcanvas/editor-api). The API documentation can be found [here](https://api.playcanvas.com/editor/).
## Automation Example
The API can be accessed via the browser's devtools console allowing for automation of repetitive tasks. In the example below, we are using the Editor to find all the Entities that have the tag 'red' and disabling them by running code in the browser console.
Editor API code:

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/ecs.md (reported line 28)May include surrounding context.

md
The Editor has a user accessible API that is currently in beta which can be used to help automate and extend the base functionality.
The API is not yet considered stable and may change in the future as we continue development. However, it is unlikely that API will change a lot from its current state.
The Editor API is open sourced on [GitHub](https://github.com/playcanvas/editor-api). The API documentation can be found [here](https://api.playcanvas.com/editor/).
## Automation Example
The API can be accessed via the browser's devtools console allowing for automation of repetitive tasks. In the example below, we are using the Editor to find all the Entities that have the tag 'red' and disabling them by running code in the browser console.
Editor API code:

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/ecs.md (reported line 37)May include surrounding context.

md
The Editor has a user accessible API that is currently in beta which can be used to help automate and extend the base functionality.
The API is not yet considered stable and may change in the future as we continue development. However, it is unlikely that API will change a lot from its current state.
The Editor API is open sourced on [GitHub](https://github.com/playcanvas/editor-api). The API documentation can be found [here](https://api.playcanvas.com/editor/).
## Automation Example
The API can be accessed via the browser's devtools console allowing for automation of repetitive tasks. In the example below, we are using the Editor to find all the Entities that have the tag 'red' and disabling them by running code in the browser console.
Editor API code:

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/ecs.md (reported line 42)May include surrounding context.

md
The Editor has a user accessible API that is currently in beta which can be used to help automate and extend the base functionality.
The API is not yet considered stable and may change in the future as we continue development. However, it is unlikely that API will change a lot from its current state.
The Editor API is open sourced on [GitHub](https://github.com/playcanvas/editor-api). The API documentation can be found [here](https://api.playcanvas.com/editor/).
## Automation Example
The API can be accessed via the browser's devtools console allowing for automation of repetitive tasks. In the example below, we are using the Editor to find all the Entities that have the tag 'red' and disabling them by running code in the browser console.
Editor API code:

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/ecs.md (reported line 44)May include surrounding context.

md
The Editor has a user accessible API that is currently in beta which can be used to help automate and extend the base functionality.
The API is not yet considered stable and may change in the future as we continue development. However, it is unlikely that API will change a lot from its current state.
The Editor API is open sourced on [GitHub](https://github.com/playcanvas/editor-api). The API documentation can be found [here](https://api.playcanvas.com/editor/).
## Automation Example
The API can be accessed via the browser's devtools console allowing for automation of repetitive tasks. In the example below, we are using the Editor to find all the Entities that have the tag 'red' and disabling them by running code in the browser console.
Editor API code:

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/ecs.md (reported line 54)May include surrounding context.

md
The Editor has a user accessible API that is currently in beta which can be used to help automate and extend the base functionality.
The API is not yet considered stable and may change in the future as we continue development. However, it is unlikely that API will change a lot from its current state.
The Editor API is open sourced on [GitHub](https://github.com/playcanvas/editor-api). The API documentation can be found [here](https://api.playcanvas.com/editor/).
## Automation Example
The API can be accessed via the browser's devtools console allowing for automation of repetitive tasks. In the example below, we are using the Editor to find all the Entities that have the tag 'red' and disabling them by running code in the browser console.
Editor API code:

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/ecs.md (reported line 67)May include surrounding context.

md
The Editor has a user accessible API that is currently in beta which can be used to help automate and extend the base functionality.
The API is not yet considered stable and may change in the future as we continue development. However, it is unlikely that API will change a lot from its current state.
The Editor API is open sourced on [GitHub](https://github.com/playcanvas/editor-api). The API documentation can be found [here](https://api.playcanvas.com/editor/).
## Automation Example
The API can be accessed via the browser's devtools console allowing for automation of repetitive tasks. In the example below, we are using the Editor to find all the Entities that have the tag 'red' and disabling them by running code in the browser console.
Editor API code:

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/ecs.md (reported line 69)May include surrounding context.

md
The Editor has a user accessible API that is currently in beta which can be used to help automate and extend the base functionality.
The API is not yet considered stable and may change in the future as we continue development. However, it is unlikely that API will change a lot from its current state.
The Editor API is open sourced on [GitHub](https://github.com/playcanvas/editor-api). The API documentation can be found [here](https://api.playcanvas.com/editor/).
## Automation Example
The API can be accessed via the browser's devtools console allowing for automation of repetitive tasks. In the example below, we are using the Editor to find all the Entities that have the tag 'red' and disabling them by running code in the browser console.
Editor API code: