Back to skill

Security audit

Auth0 Aspnetcore Api

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent Auth0 setup guide for ASP.NET Core APIs, with expected token and CLI examples but some secret-handling and dependency-pinning cautions.

Reasonable to install if you are adding Auth0 to an ASP.NET Core API. Before following commands, pin the NuGet package version, use trusted package sources, keep real client secrets out of source code and screenshots, and prefer environment variables or a secret store for sensitive values.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:48
Finding

Unpinned Auth0 NuGet Dependency

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 48
Vulnerability Type: Unpinned third-party dependency
Risk Level: Medium

Vulnerable Code

bash
dotnet add package Auth0.AspNetCore.Authentication.Api

Technical Analysis

The installation command does not specify a package version. NuGet will therefore resolve a version using the configured package sources and the package versions available when the command is executed. This makes installation non-reproducible and prevents the audited documentation from guaranteeing which dependency implementation users will receive.

If a configured NuGet source is compromised, untrusted, or susceptible to dependency confusion, an attacker could supply a malicious version of the expected package. A future compromised upstream release could produce a similar result. This finding does not establish that the named Auth0 package is currently malicious; the risk arises from unconstrained dependency resolution.

Attack Path

  1. An attacker compromises an upstream or locally configured NuGet source, or causes an attacker-controlled source to take precedence.
  2. The attacker publishes or exposes a malicious package version under the expected package identity.
  3. A user follows the documented installation command without specifying a reviewed version.
  4. NuGet resolves and restores the attacker-controlled or compromised version.
  5. Malicious package behavior executes during build or becomes part of the resulting application.

Impact Assessment

Exploitation could execute dependency-controlled code with the privileges of the build process or deployed ASP.NET Core application. Depending on that environment, this could expose source code, build credentials, environment variables, Auth0 configuration, application data, and network-accessible resources. It could also compromise build artifacts or deployed services. The practical scope is constrained by the privile ...[truncated 76 chars]

Remediation
View remediation

Remediation Suggestions

Pin the dependency to a specifically reviewed version:

bash
dotnet add package Auth0.AspNetCore.Authentication.Api --version <reviewed-version>

Apply the following additional controls:

  • Permit restoration only from explicitly trusted NuGet sources.
  • Use NuGet package source mapping to prevent unintended source selection.
  • Commit a lock file or use central package management to ensure reproducible resolution.
  • Enable package signature validation where supported.
  • Run dependency and vulnerability scanning in CI.
  • Review and deliberately approve dependency upgrades rather than automatically accepting the newest available release.
  • Execute builds with least privilege and restrict access to production credentials and sensitive networks.

T08 · Insecure Dependencies

Warning
Location
references/setup.md:41
Finding

Unpinned Auth0 NuGet Dependency in Setup Guide

Content
View full analysis

Vulnerability Details

File Location: references/setup.md, line 41
Vulnerability Type: Unpinned third-party dependency
Risk Level: Medium

Vulnerable Code

bash
dotnet add package Auth0.AspNetCore.Authentication.Api

Technical Analysis

The manual setup guide independently instructs users to install the Auth0 package without an explicit version constraint. Consequently, the exact code restored depends on package-source configuration and availability at installation time rather than on a version reviewed with this Skill.

This creates a supply-chain exposure if a package source is compromised or improperly prioritized, or if an upstream release is compromised in the future. There is no evidence in the audited files that the current Auth0 package is malicious; this finding concerns the unsafe, non-reproducible dependency installation practice.

Attack Path

  1. An attacker gains control over, or precedence within, a NuGet source used by the victim.
  2. A malicious or compromised version of the expected dependency becomes available.
  3. The victim follows the manual setup guide.
  4. The unversioned command restores the unsafe version.
  5. Dependency-controlled code runs in the build process or deployed API.

Impact Assessment

Successful exploitation could grant code execution at the privilege level of the build account or application service account. Potentially exposed assets include repository contents, CI secrets, environment variables, application configuration, tokens available to the process, generated artifacts, and resources reachable from the build or runtime network.

Remediation
View remediation

Remediation Suggestions

Replace the command with a version-pinned installation instruction:

bash
dotnet add package Auth0.AspNetCore.Authentication.Api --version <reviewed-version>

Keep the pinned version synchronized with the primary guide and establish a controlled update process. In addition:

  • Restrict NuGet restoration to approved sources.
  • Configure package source mapping.
  • Use lock files or central package version management.
  • Validate package signatures and integrity where available.
  • Scan dependencies continuously and review security advisories.
  • Isolate build jobs and avoid exposing unnecessary secrets or production network access.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (14)

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 · SKILL.md (reported line 3)May include surrounding context.

md
---
name: auth0-aspnetcore-api
description: "Use when securing ASP.NET Core Web API endpoints with JWT Bearer token validation, scope/permission checks, or stateless auth - integrates Auth0.AspNetCore.Authentication.Api for REST APIs receiving access tokens from frontends or mobile apps. Also handles DPoP proof-of-possession token binding. Triggers on: AddAuth0ApiAuthentication, .NET Web API auth, JWT validation, UseAuthentication, UseAuthorization."
license: Apache-2.0
metadata:
  author: Auth0 <support@auth0.com>

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 · SKILL.md (reported line 15)May include surrounding context.

md
# Auth0 ASP.NET Core Web API Integration

Protect ASP.NET Core Web API endpoints with JWT access token validation using Auth0.AspNetCore.Authentication.Api.

---

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 · SKILL.md (reported line 157)May include surrounding context.

md
# Auth0 ASP.NET Core Web API Integration

Protect ASP.NET Core Web API endpoints with JWT access token validation using Auth0.AspNetCore.Authentication.Api.

---

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 · SKILL.md (reported line 176)May include surrounding context.

md
# Auth0 ASP.NET Core Web API Integration

Protect ASP.NET Core Web API endpoints with JWT access token validation using Auth0.AspNetCore.Authentication.Api.

---

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/setup.md (reported line 99)May include surrounding context.

md
# Auth0 ASP.NET Core Web API Integration

Protect ASP.NET Core Web API endpoints with JWT access token validation using Auth0.AspNetCore.Authentication.Api.

---

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 · SKILL.md (reported line 235)May include surrounding context.

md
- [Auth0 ASP.NET Core Web API Quickstart](https://auth0.com/docs/quickstart/backend/aspnet-core-webapi)
- [SDK GitHub Repository](https://github.com/auth0/aspnetcore-api)
- [API Documentation](https://auth0.github.io/aspnetcore-api)
- [Access Tokens Guide](https://auth0.com/docs/secure/tokens/access-tokens)

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 174)May include surrounding context.

Via Auth0 CLI (Client Credentials)

bash
# Get access token for testing
auth0 test token \
  --audience https://my-api.example.com

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/integration.md (reported line 215)May include surrounding context.

Via Auth0 CLI (Client Credentials)

bash
# Get access token for testing
auth0 test token \
  --audience https://my-api.example.com

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/integration.md (reported line 225)May include surrounding context.

Via Auth0 CLI (Client Credentials)

bash
# Get access token for testing
auth0 test token \
  --audience https://my-api.example.com

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/integration.md (reported line 238)May include surrounding context.

Via Auth0 CLI (Client Credentials)

bash
# Get access token for testing
auth0 test token \
  --audience https://my-api.example.com

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/setup.md (reported line 104)May include surrounding context.

Via Auth0 CLI (Client Credentials)

bash
# Get access token for testing
auth0 test token \
  --audience https://my-api.example.com

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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/integration.md (reported line 78)May include surrounding context.

bash
# Client Credentials with specific scopes
curl -X POST https://your-tenant.auth0.com/oauth/token \
  -H "Content-Type: application/json" \
  -d '{
    "client_id": "YOUR_CLIENT_ID",

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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/setup.md (reported line 109)May include surrounding context.

--audience https://my-api.example.com

text

### Via curl (Client Credentials Flow)

```bash
curl -X POST https://your-tenant.auth0.com/oauth/token \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The guide includes a client credentials curl example with a literal client_secret field but does not warn users not to hardcode, commit, or share that secret. In setup documentation, this can normalize unsafe secret handling and lead to accidental exposure in shell history, source control, screenshots, or logs.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.