CWE-732
Allowed-with-ReviewIncorrect Permission Assignment for Critical Resource
Abstraction: Class · Status: Draft
The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors.
2150 vulnerabilities reference this CWE, most recent first.
GHSA-Q8QC-66PH-9F73
Vulnerability from github – Published: 2022-05-24 16:50 – Updated: 2024-04-04 01:18Akeo Consulting Rufus 3.0 and earlier is affected by: Insecure Permissions. The impact is: arbitrary code execution with escalation of privilege. The component is: Executable installer, portable executable (ALL executables available). The attack vector is: CWE-29, CWE-377, CWE-379.
{
"affected": [],
"aliases": [
"CVE-2019-1010101"
],
"database_specific": {
"cwe_ids": [
"CWE-732"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-07-19T16:15:00Z",
"severity": "CRITICAL"
},
"details": "Akeo Consulting Rufus 3.0 and earlier is affected by: Insecure Permissions. The impact is: arbitrary code execution with escalation of privilege. The component is: Executable installer, portable executable (ALL executables available). The attack vector is: CWE-29, CWE-377, CWE-379.",
"id": "GHSA-q8qc-66ph-9f73",
"modified": "2024-04-04T01:18:53Z",
"published": "2022-05-24T16:50:42Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-1010101"
},
{
"type": "WEB",
"url": "http://seclists.org/oss-sec/2018/q2/146"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-Q8X7-J9X6-2FPC
Vulnerability from github – Published: 2026-03-04 18:31 – Updated: 2026-04-02 15:31A vulnerability was recently discovered in the rpc.mountd daemon in the nfs-utils package for Linux, that allows a NFSv3 client to escalate the privileges assigned to it in the /etc/exports file at mount time. In particular, it allows the client to access any subdirectory or subtree of an exported directory, regardless of the set file permissions, and regardless of any 'root_squash' or 'all_squash' attributes that would normally be expected to apply to that client.
{
"affected": [],
"aliases": [
"CVE-2025-12801"
],
"database_specific": {
"cwe_ids": [
"CWE-279",
"CWE-732"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-03-04T16:16:23Z",
"severity": "MODERATE"
},
"details": "A vulnerability was recently discovered in the rpc.mountd daemon in the nfs-utils package for Linux, that allows a NFSv3 client to escalate the\nprivileges assigned to it in the /etc/exports file at mount time. In particular, it allows the client to access any subdirectory or subtree of an exported directory, regardless of the set file permissions, and regardless of any \u0027root_squash\u0027 or \u0027all_squash\u0027 attributes that would normally be expected to apply to that client.",
"id": "GHSA-q8x7-j9x6-2fpc",
"modified": "2026-04-02T15:31:35Z",
"published": "2026-03-04T18:31:52Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-12801"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:3938"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:3939"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:3940"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:3941"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:3942"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:5127"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:5606"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:5867"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:5873"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:5877"
},
{
"type": "WEB",
"url": "https://access.redhat.com/security/cve/CVE-2025-12801"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2413081"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-Q9FH-78J6-QR84
Vulnerability from github – Published: 2022-05-13 01:20 – Updated: 2022-05-13 01:20A permissions issue existed in which execute permission was incorrectly granted. This issue was addressed with improved permission validation. This issue affected versions prior to macOS High Sierra 10.13.4.
{
"affected": [],
"aliases": [
"CVE-2018-4178"
],
"database_specific": {
"cwe_ids": [
"CWE-732"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-04-03T18:29:00Z",
"severity": "MODERATE"
},
"details": "A permissions issue existed in which execute permission was incorrectly granted. This issue was addressed with improved permission validation. This issue affected versions prior to macOS High Sierra 10.13.4.",
"id": "GHSA-q9fh-78j6-qr84",
"modified": "2022-05-13T01:20:14Z",
"published": "2022-05-13T01:20:14Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-4178"
},
{
"type": "WEB",
"url": "https://support.apple.com/kb/HT208937"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-Q9G8-F5HF-9356
Vulnerability from github – Published: 2022-05-24 16:46 – Updated: 2024-04-04 00:42OpenText Brava! Enterprise and Brava! Server 7.5 through 16.4 configure excessive permissions by default on Windows. During installation, a displaylistcache file share is created on the Windows server with full read and write permissions for the Everyone group at both the NTFS and Share levels. The share is used to retrieve documents for processing, and to store processed documents for display in the browser. The only required share level access is read/write by the JobProcessor service account. At the local filesystem level, the only additional required permissions would be read/write from the servlet engine, such as Tomcat. (The affected server components are not installed with Content Server by default, and must be installed separately.) NOTE: the vendor's position is that customers are not supposed to use this default setting without consulting the documentation.
{
"affected": [],
"aliases": [
"CVE-2019-12270"
],
"database_specific": {
"cwe_ids": [
"CWE-732"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-05-21T21:29:00Z",
"severity": "HIGH"
},
"details": "OpenText Brava! Enterprise and Brava! Server 7.5 through 16.4 configure excessive permissions by default on Windows. During installation, a displaylistcache file share is created on the Windows server with full read and write permissions for the Everyone group at both the NTFS and Share levels. The share is used to retrieve documents for processing, and to store processed documents for display in the browser. The only required share level access is read/write by the JobProcessor service account. At the local filesystem level, the only additional required permissions would be read/write from the servlet engine, such as Tomcat. (The affected server components are not installed with Content Server by default, and must be installed separately.) NOTE: the vendor\u0027s position is that customers are not supposed to use this default setting without consulting the documentation.",
"id": "GHSA-q9g8-f5hf-9356",
"modified": "2024-04-04T00:42:59Z",
"published": "2022-05-24T16:46:09Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-12270"
},
{
"type": "WEB",
"url": "https://packetstormsecurity.com/files/150125/Brava-Enterprise-Server-16.4-Information-Disclosure.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-Q9H2-7M5W-75P4
Vulnerability from github – Published: 2024-02-02 18:30 – Updated: 2024-02-02 18:30An incorrect permission assignment for critical resource vulnerability has been reported to affect Qsync Central. If exploited, the vulnerability could allow authenticated users to read or modify the resource via a network.
We have already fixed the vulnerability in the following versions: Qsync Central 4.4.0.15 ( 2024/01/04 ) and later Qsync Central 4.3.0.11 ( 2024/01/11 ) and later
{
"affected": [],
"aliases": [
"CVE-2023-47564"
],
"database_specific": {
"cwe_ids": [
"CWE-732"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-02-02T16:15:52Z",
"severity": "HIGH"
},
"details": "An incorrect permission assignment for critical resource vulnerability has been reported to affect Qsync Central. If exploited, the vulnerability could allow authenticated users to read or modify the resource via a network.\n\nWe have already fixed the vulnerability in the following versions:\nQsync Central 4.4.0.15 ( 2024/01/04 ) and later\nQsync Central 4.3.0.11 ( 2024/01/11 ) and later\n",
"id": "GHSA-q9h2-7m5w-75p4",
"modified": "2024-02-02T18:30:32Z",
"published": "2024-02-02T18:30:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-47564"
},
{
"type": "WEB",
"url": "https://www.qnap.com/en/security-advisory/qsa-24-03"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-Q9PG-JJ6X-J9P6
Vulnerability from github – Published: 2026-07-21 20:19 – Updated: 2026-07-21 20:19Summary
Gitea's draft-release access control is enforced only on the API release endpoints (/api/v1/repos/{owner}/{repo}/releases/{id} and its /assets/... sub-routes) but not on the web-level UUID-based attachment endpoints (/attachments/{uuid}, /{owner}/{repo}/attachments/{uuid}, /{owner}/{repo}/releases/attachments/{uuid}). Anyone (including unauthenticated callers) who has, learns, or otherwise obtains the UUID of an attachment belonging to a draft release can download its full contents, despite the draft release itself being correctly hidden from listings and direct-by-ID API lookups.
The browser_download_url field returned by the API (visible to anyone with write access to the repo) embeds the UUID. Forwarding this URL by email, log scrape, browser history, screenshot, or any side channel grants any recipient unauthenticated access to the attachment, indefinitely. This is the identical insider-leak threat model that Gitea fixed on the API surface in PR #36659 (CVE-2026-27660, Feb 2026) by adding canAccessReleaseDraft checks. The web mirror was missed.
Details
Root cause: the web-side handler ServeAttachment (routers/web/repo/attachment.go:122-203) checks only repo-level unit-read permission, never the IsDraft flag of the linked release:
// routers/web/repo/attachment.go:122-203, current implementation
func ServeAttachment(ctx *context.Context, uuid string) {
attach, err := repo_model.GetAttachmentByUUID(ctx, uuid)
if err != nil { ... }
// cross-repo guard (only fires when accessed via repo-scoped URL)
if attach.CreatedUnix > repo_model.LegacyAttachmentMissingRepoIDCutoff &&
ctx.Repo.Repository != nil && ctx.Repo.Repository.ID != attach.RepoID {
ctx.HTTPError(http.StatusNotFound)
return
}
unitType, repoID, err := repo_service.GetAttachmentLinkedTypeAndRepoID(ctx, attach)
if unitType == unit.TypeInvalid {
if !(ctx.IsSigned && attach.UploaderID == ctx.Doer.ID) {
ctx.HTTPError(http.StatusNotFound)
return
}
} else {
var perm access_model.Permission
// ... resolves repo perm
if !perm.CanRead(unitType) { // <-- ONLY check
ctx.HTTPError(http.StatusNotFound)
return
}
// NO release.IsDraft check
// NO canAccessReleaseDraft equivalent
}
// ... serves the file
}
The helper GetAttachmentLinkedTypeAndRepoID (services/repository/repository.go:185-207) returns (unit.TypeReleases, rel.RepoID) for release-linked attachments but discards the release object (including its IsDraft flag) before returning.
Mounted routes affected (all reach ServeAttachment via GetAttachment):
| File:line | Route | Auth gate |
|---|---|---|
routers/web/web.go:874 |
GET /attachments/{uuid} (top-level) |
optionsCorsHandler() + webAuth.AllowBasic + webAuth.AllowOAuth2, accepts anonymous |
routers/web/web.go:1284 |
GET /{owner}/{repo}/attachments/{uuid} (issue-context) |
repo context, anonymous OK |
routers/web/web.go:1473 |
GET /{owner}/{repo}/releases/attachments/{uuid} (release-context) |
webAuth.AllowBasic + webAuth.AllowOAuth2, anonymous OK |
routers/web/web.go:1491 |
GET /{owner}/{repo}/attachments/{uuid} (legacy compatibility) |
webAuth.AllowBasic + webAuth.AllowOAuth2, anonymous OK |
Reference: existing fix on the API surface (PR #36659, commit 1eced4a7c0, Feb 22 2026):
// routers/api/v1/repo/release.go:24-37, added by PR #36659
func canAccessReleaseDraft(ctx *context.APIContext) bool {
if !ctx.IsSigned || !ctx.Repo.Permission.CanWrite(unit.TypeReleases) {
return false
}
// ... API-token scope check
}
canAccessReleaseDraft is called from GetRelease (line 80), ListReleases (line 178), GetReleaseAttachment (release_attachment.go:37), and ListReleaseAttachments (line 148). Every API code path now gates draft visibility on write access. The web-side ServeAttachment was not updated; it continues to gate only on read access, allowing anonymous and non-collaborator reads.
Suggested patch at routers/web/repo/attachment.go:166-172, extending the existing permission check to also gate draft releases on write access:
} else { // linked attachment
var perm access_model.Permission
if ctx.Repo.Repository == nil {
repo, err := repo_model.GetRepositoryByID(ctx, repoID)
if err != nil { ... }
perm, err = access_model.GetDoerRepoPermission(ctx, repo, ctx.Doer)
if err != nil { ... }
} else {
perm = ctx.Repo.Permission
}
if !perm.CanRead(unitType) {
ctx.HTTPError(http.StatusNotFound)
return
}
// NEW: if linked to a draft release, require write access to releases
if unitType == unit.TypeReleases && attach.ReleaseID != 0 {
rel, err := repo_model.GetReleaseByID(ctx, attach.ReleaseID)
if err == nil && rel.IsDraft && !perm.CanWrite(unit.TypeReleases) {
ctx.HTTPError(http.StatusNotFound)
return
}
}
}
Alternatively, GetAttachmentLinkedTypeAndRepoID could return the linked release object so the caller does not need a second DB read.
PoC
Tested against v1.27.0+dev-228-ga564f0587a (commit a564f0587a), default configuration, local-storage attachments.
Setup:
- alice owns public repo alice/alice-pub
- carol is a registered user with no relationship to alice (no collaboration, no org membership)
Step 1: alice creates a confidential draft release and uploads a sensitive file:
$ DRAFT=$(curl -s -H "Authorization: token $ALICE_TOKEN" -H 'Content-Type: application/json' \
-d '{"tag_name":"v1.0-CONFIDENTIAL","target_commitish":"main",
"name":"INTERNAL PREVIEW","body":"unreleased build",
"draft":true,"prerelease":false}' \
http://127.0.0.1:3000/api/v1/repos/alice/alice-pub/releases)
$ DID=$(echo "$DRAFT" | jq -r .id) # e.g. 15
$ echo "TOP_SECRET_BUILD_ARTIFACT" > confidential.txt
$ ATT=$(curl -s -H "Authorization: token $ALICE_TOKEN" \
-F "attachment=@confidential.txt;filename=confidential.txt" \
http://127.0.0.1:3000/api/v1/repos/alice/alice-pub/releases/$DID/assets)
$ UUID=$(echo "$ATT" | jq -r .uuid)
$ ATT_ID=$(echo "$ATT" | jq -r .id)
# UUID: a4701819-6f12-42e4-82fb-14b2a1191e8a
# browser_download_url returned: http://127.0.0.1:3000/attachments/<UUID>
Step 2: non-collaborator carol cannot see the draft via the API (correct):
$ curl -s -o /dev/null -w '%{http_code}\n' \
-H "Authorization: token $CAROL_TOKEN" \
http://127.0.0.1:3000/api/v1/repos/alice/alice-pub/releases/$DID/assets/$ATT_ID
404
Step 3: but carol (and even anonymous callers) CAN download via UUID-based web endpoints:
# (C) carol, top-level
$ curl -s -H "Authorization: token $CAROL_TOKEN" \
http://127.0.0.1:3000/attachments/$UUID
TOP_SECRET_BUILD_ARTIFACT # <-- 200 OK, full content
# (D) carol, repo-scoped legacy
$ curl -s -H "Authorization: token $CAROL_TOKEN" \
http://127.0.0.1:3000/alice/alice-pub/attachments/$UUID
TOP_SECRET_BUILD_ARTIFACT # <-- 200 OK
# (E) carol, release-scoped web
$ curl -s -H "Authorization: token $CAROL_TOKEN" \
http://127.0.0.1:3000/alice/alice-pub/releases/attachments/$UUID
TOP_SECRET_BUILD_ARTIFACT # <-- 200 OK
# (G) anonymous, top-level (NO auth header)
$ curl -s http://127.0.0.1:3000/attachments/$UUID
TOP_SECRET_BUILD_ARTIFACT # <-- 200 OK, no auth needed at all
# (H) anonymous, repo-scoped legacy
$ curl -s http://127.0.0.1:3000/alice/alice-pub/attachments/$UUID
TOP_SECRET_BUILD_ARTIFACT # <-- 200 OK
Verdict matrix:
| Endpoint | Carol (auth, non-collab) | Anonymous |
|---|---|---|
API /api/v1/.../releases/{id}/assets/{aid} |
404 (gated) | 404 (gated) |
API /api/v1/.../releases/{id}/assets |
404 (gated) | 404 (gated) |
Web /attachments/{uuid} |
200 LEAKS | 200 LEAKS |
Web /{owner}/{repo}/attachments/{uuid} |
200 LEAKS | 200 LEAKS |
Web /{owner}/{repo}/releases/attachments/{uuid} |
200 LEAKS | 200 LEAKS |
Web browser_download_url (as returned by API) |
200 LEAKS | 200 LEAKS |
Impact
Vulnerability class: Missing authorization (CWE-862) on a parallel code path that was overlooked when the same authorization check was added in a separate handler. This is an incomplete fix for CVE-2026-27660.
Why this is an exploitable vulnerability, not a "configure it differently" issue:
The Gitea draft-release feature exists for exactly one purpose: stage release content that is not yet meant to be public. The fix in PR #36659 (CVE-2026-27660) explicitly stated "Draft release and its attachments need a write permission to access" and accordingly gated GET /api/v1/repos/.../releases/{id} and GET /api/v1/repos/.../releases/{id}/assets/{aid} behind canAccessReleaseDraft. The web-side ServeAttachment handler (which is reachable from three separate routes on the same host as the API and serves the same underlying attachment object) was not updated. The result is that the security promise communicated to operators ("draft attachments are visible only to repo writers") is silently false on the web URLs that the API itself hands out in browser_download_url.
The maintainer cannot reframe this as "UUID is a capability token" because Gitea has already explicitly rejected that model on the API surface for this exact resource class two months ago. The threat model is identical; only the handler is different.
Real-world content that leaks under this bug:
Draft releases are routinely used to stage:
- Pre-release signed binaries (Windows MSIs, macOS notarized DMGs, Linux RPM/DEB) before publication: unauthenticated download of unannounced builds.
- Security-fix release candidates: pre-disclosure window for downstream patching, exploitable if the binary diff reveals the bug.
- Internal SBOMs, signing manifests, third-party license bundles: supply-chain reconnaissance.
- Release-key public-blob bundles, attestation files: key-rotation tracking by external observers.
- Build artifacts pinned to draft tags by CI pipelines that publish-on-merge: access to artifacts the release engineer hasn't decided to ship.
- CHANGELOG / release-notes drafts: pre-disclosure of upcoming features or vulns.
These are not hypothetical use cases. They are the documented and intended use of the draft-release feature on every git forge.
Realistic attack scenarios (insider-leak threat model, same as CVE-2026-27660):
-
Browser-UI "Copy link" causes the URL to leave the trust boundary. A release engineer is preparing the next release and copies the
browser_download_urlto test the binary on a fresh VM, then pastes it into a Slack thread, a Jira ticket, an email to QA, or a commit message ("# binary: $URL"). Anyone who later reads that channel (including ex-employees, contractors who lost write access, or anyone scraping public Slack archives) has anonymous, unauthenticated, indefinite access to the draft binary. -
Reverse-proxy or observability stack records the URL. nginx, Caddy, HAProxy, Cloudflare, Datadog, Splunk, ELK: any HTTP-instrumentation pipeline records request paths. Anyone with log read access can extract UUIDs and pull the underlying attachment without authenticating to Gitea at all. For ELT pipelines that copy logs to cloud buckets or data lakes, that read access can be very broad.
-
Browser history, Referer, extension telemetry. Once an authorized user downloads a draft attachment, the UUID-bearing URL lives in browser history, optional cloud-synced history (Chrome Sync, Edge Sync, Firefox Sync, recoverable on any signed-in device), browser extension telemetry, and any
Refererheader sent if the URL is loaded in a frame or via an inline asset. -
Search-engine and mirror indexing. Internal portals, asset inventories, dependency scanners, and SaaS supply-chain tools that follow
browser_download_urlto index release artifacts will index the draft URL just like a published one. Once indexed, the URL is discoverable for as long as the index lives. -
Embedded links in public content. A draft-release-attachment URL pasted into an issue comment, a PR description, a wiki page, or a README is rendered as a clickable
<a href>to any reader of that public page. Readers don't see the draft release itself but get the attachment behind the link they click.
Severity calibration via direct precedent:
| Property | CVE-2026-27660 (this finding's API mirror) | This finding |
|---|---|---|
| Vulnerability class | Missing authorization on draft release | Missing authorization on draft release attachments |
| Attack vector | Network | Network |
| Privileges required | None (relies on UUID/ID being leaked) | None (relies on UUID being leaked) |
| Attack complexity | High (must obtain UUID/ID) | High (must obtain UUID) |
| Confidentiality | High | High |
| Integrity / Availability | None | None |
| Fix complexity | ~5-line authz check added at handler entry | ~5-line authz check added at handler entry |
| Severity assigned by upstream | Medium | Should be Medium (5.9) by direct precedent |
If CVE-2026-27660 was accepted as a Medium-severity security advisory worth a dedicated PR, an identical bug in the web mirror of the same data is also Medium-severity. The maintainer cannot consistently rate this lower without retroactively downgrading their own previous fix.
CVSS 3.1: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N = 5.9 / Medium
AV:N: reachable over the network.AC:H: attacker must obtain the UUID via a leak channel (same prerequisite class as the upstream CVE).PR:N: no authentication required (anonymous works).UI:N: no user interaction required.S:U: scope unchanged (still bounded to Gitea's auth boundary; the draft release was supposed to be inside that boundary but isn't).C:H: full confidentiality breach of the attachment contents.I:N/A:N: read-only.
Out of scope: brute-forcing the UUID is infeasible (122 bits of UUIDv4 entropy). This is a confidentiality-loss bug, not an integrity or availability bug.
Deployment scale: Gitea is a top-three self-hosted forge (~30 k+ public Internet-reachable instances per Shodan, plus very large numbers of internal corporate deployments and Codeberg / Forgejo derivatives that inherit the same code). The bug is present in the default configuration; no operator action is required to make a deployment vulnerable.
Fix complexity: trivial. Add a release.IsDraft && !perm.CanWrite(unit.TypeReleases) check in ServeAttachment (single function, ~5 lines added). Patch is provided in the Details section. No data migration, no UX change, no breaking-API change.
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "code.gitea.io/gitea"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.27.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-58432"
],
"database_specific": {
"cwe_ids": [
"CWE-200",
"CWE-639",
"CWE-732",
"CWE-862"
],
"github_reviewed": true,
"github_reviewed_at": "2026-07-21T20:19:25Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "### Summary\n\nGitea\u0027s draft-release access control is enforced only on the API release endpoints (`/api/v1/repos/{owner}/{repo}/releases/{id}` and its `/assets/...` sub-routes) but not on the web-level UUID-based attachment endpoints (`/attachments/{uuid}`, `/{owner}/{repo}/attachments/{uuid}`, `/{owner}/{repo}/releases/attachments/{uuid}`). Anyone (including unauthenticated callers) who has, learns, or otherwise obtains the UUID of an attachment belonging to a draft release can download its full contents, despite the draft release itself being correctly hidden from listings and direct-by-ID API lookups.\n\nThe `browser_download_url` field returned by the API (visible to anyone with write access to the repo) embeds the UUID. Forwarding this URL by email, log scrape, browser history, screenshot, or any side channel grants any recipient unauthenticated access to the attachment, indefinitely. This is the identical insider-leak threat model that Gitea fixed on the API surface in PR #36659 (CVE-2026-27660, Feb 2026) by adding `canAccessReleaseDraft` checks. The web mirror was missed.\n\n### Details\n\n**Root cause:** the web-side handler `ServeAttachment` (`routers/web/repo/attachment.go:122-203`) checks only repo-level unit-read permission, never the `IsDraft` flag of the linked release:\n\n```go\n// routers/web/repo/attachment.go:122-203, current implementation\nfunc ServeAttachment(ctx *context.Context, uuid string) {\n attach, err := repo_model.GetAttachmentByUUID(ctx, uuid)\n if err != nil { ... }\n\n // cross-repo guard (only fires when accessed via repo-scoped URL)\n if attach.CreatedUnix \u003e repo_model.LegacyAttachmentMissingRepoIDCutoff \u0026\u0026\n ctx.Repo.Repository != nil \u0026\u0026 ctx.Repo.Repository.ID != attach.RepoID {\n ctx.HTTPError(http.StatusNotFound)\n return\n }\n\n unitType, repoID, err := repo_service.GetAttachmentLinkedTypeAndRepoID(ctx, attach)\n if unitType == unit.TypeInvalid {\n if !(ctx.IsSigned \u0026\u0026 attach.UploaderID == ctx.Doer.ID) {\n ctx.HTTPError(http.StatusNotFound)\n return\n }\n } else {\n var perm access_model.Permission\n // ... resolves repo perm\n if !perm.CanRead(unitType) { // \u003c-- ONLY check\n ctx.HTTPError(http.StatusNotFound)\n return\n }\n // NO release.IsDraft check\n // NO canAccessReleaseDraft equivalent\n }\n // ... serves the file\n}\n```\n\nThe helper `GetAttachmentLinkedTypeAndRepoID` (`services/repository/repository.go:185-207`) returns `(unit.TypeReleases, rel.RepoID)` for release-linked attachments but discards the release object (including its `IsDraft` flag) before returning.\n\n**Mounted routes affected** (all reach `ServeAttachment` via `GetAttachment`):\n\n| File:line | Route | Auth gate |\n|---|---|---|\n| `routers/web/web.go:874` | `GET /attachments/{uuid}` (top-level) | `optionsCorsHandler() + webAuth.AllowBasic + webAuth.AllowOAuth2`, accepts anonymous |\n| `routers/web/web.go:1284` | `GET /{owner}/{repo}/attachments/{uuid}` (issue-context) | repo context, anonymous OK |\n| `routers/web/web.go:1473` | `GET /{owner}/{repo}/releases/attachments/{uuid}` (release-context) | `webAuth.AllowBasic + webAuth.AllowOAuth2`, anonymous OK |\n| `routers/web/web.go:1491` | `GET /{owner}/{repo}/attachments/{uuid}` (legacy compatibility) | `webAuth.AllowBasic + webAuth.AllowOAuth2`, anonymous OK |\n\n**Reference: existing fix on the API surface (PR #36659, commit `1eced4a7c0`, Feb 22 2026):**\n\n```go\n// routers/api/v1/repo/release.go:24-37, added by PR #36659\nfunc canAccessReleaseDraft(ctx *context.APIContext) bool {\n if !ctx.IsSigned || !ctx.Repo.Permission.CanWrite(unit.TypeReleases) {\n return false\n }\n // ... API-token scope check\n}\n```\n\n`canAccessReleaseDraft` is called from `GetRelease` (line 80), `ListReleases` (line 178), `GetReleaseAttachment` (`release_attachment.go:37`), and `ListReleaseAttachments` (line 148). Every API code path now gates draft visibility on **write access**. The web-side `ServeAttachment` was not updated; it continues to gate only on **read access**, allowing anonymous and non-collaborator reads.\n\n**Suggested patch** at `routers/web/repo/attachment.go:166-172`, extending the existing permission check to also gate draft releases on write access:\n\n```go\n} else { // linked attachment\n var perm access_model.Permission\n if ctx.Repo.Repository == nil {\n repo, err := repo_model.GetRepositoryByID(ctx, repoID)\n if err != nil { ... }\n perm, err = access_model.GetDoerRepoPermission(ctx, repo, ctx.Doer)\n if err != nil { ... }\n } else {\n perm = ctx.Repo.Permission\n }\n\n if !perm.CanRead(unitType) {\n ctx.HTTPError(http.StatusNotFound)\n return\n }\n\n // NEW: if linked to a draft release, require write access to releases\n if unitType == unit.TypeReleases \u0026\u0026 attach.ReleaseID != 0 {\n rel, err := repo_model.GetReleaseByID(ctx, attach.ReleaseID)\n if err == nil \u0026\u0026 rel.IsDraft \u0026\u0026 !perm.CanWrite(unit.TypeReleases) {\n ctx.HTTPError(http.StatusNotFound)\n return\n }\n }\n}\n```\n\nAlternatively, `GetAttachmentLinkedTypeAndRepoID` could return the linked release object so the caller does not need a second DB read.\n\n### PoC\n\nTested against `v1.27.0+dev-228-ga564f0587a` (commit `a564f0587a`), default configuration, local-storage attachments.\n\n**Setup:**\n- `alice` owns public repo `alice/alice-pub`\n- `carol` is a registered user with no relationship to `alice` (no collaboration, no org membership)\n\n**Step 1: alice creates a confidential draft release and uploads a sensitive file:**\n\n```bash\n$ DRAFT=$(curl -s -H \"Authorization: token $ALICE_TOKEN\" -H \u0027Content-Type: application/json\u0027 \\\n -d \u0027{\"tag_name\":\"v1.0-CONFIDENTIAL\",\"target_commitish\":\"main\",\n \"name\":\"INTERNAL PREVIEW\",\"body\":\"unreleased build\",\n \"draft\":true,\"prerelease\":false}\u0027 \\\n http://127.0.0.1:3000/api/v1/repos/alice/alice-pub/releases)\n$ DID=$(echo \"$DRAFT\" | jq -r .id) # e.g. 15\n\n$ echo \"TOP_SECRET_BUILD_ARTIFACT\" \u003e confidential.txt\n$ ATT=$(curl -s -H \"Authorization: token $ALICE_TOKEN\" \\\n -F \"attachment=@confidential.txt;filename=confidential.txt\" \\\n http://127.0.0.1:3000/api/v1/repos/alice/alice-pub/releases/$DID/assets)\n$ UUID=$(echo \"$ATT\" | jq -r .uuid)\n$ ATT_ID=$(echo \"$ATT\" | jq -r .id)\n# UUID: a4701819-6f12-42e4-82fb-14b2a1191e8a\n# browser_download_url returned: http://127.0.0.1:3000/attachments/\u003cUUID\u003e\n```\n\n**Step 2: non-collaborator carol cannot see the draft via the API (correct):**\n\n```bash\n$ curl -s -o /dev/null -w \u0027%{http_code}\\n\u0027 \\\n -H \"Authorization: token $CAROL_TOKEN\" \\\n http://127.0.0.1:3000/api/v1/repos/alice/alice-pub/releases/$DID/assets/$ATT_ID\n404\n```\n\n**Step 3: but carol (and even anonymous callers) CAN download via UUID-based web endpoints:**\n\n```bash\n# (C) carol, top-level\n$ curl -s -H \"Authorization: token $CAROL_TOKEN\" \\\n http://127.0.0.1:3000/attachments/$UUID\nTOP_SECRET_BUILD_ARTIFACT # \u003c-- 200 OK, full content\n\n# (D) carol, repo-scoped legacy\n$ curl -s -H \"Authorization: token $CAROL_TOKEN\" \\\n http://127.0.0.1:3000/alice/alice-pub/attachments/$UUID\nTOP_SECRET_BUILD_ARTIFACT # \u003c-- 200 OK\n\n# (E) carol, release-scoped web\n$ curl -s -H \"Authorization: token $CAROL_TOKEN\" \\\n http://127.0.0.1:3000/alice/alice-pub/releases/attachments/$UUID\nTOP_SECRET_BUILD_ARTIFACT # \u003c-- 200 OK\n\n# (G) anonymous, top-level (NO auth header)\n$ curl -s http://127.0.0.1:3000/attachments/$UUID\nTOP_SECRET_BUILD_ARTIFACT # \u003c-- 200 OK, no auth needed at all\n\n# (H) anonymous, repo-scoped legacy\n$ curl -s http://127.0.0.1:3000/alice/alice-pub/attachments/$UUID\nTOP_SECRET_BUILD_ARTIFACT # \u003c-- 200 OK\n```\n\n**Verdict matrix:**\n\n| Endpoint | Carol (auth, non-collab) | Anonymous |\n|---|---|---|\n| API `/api/v1/.../releases/{id}/assets/{aid}` | 404 (gated) | 404 (gated) |\n| API `/api/v1/.../releases/{id}/assets` | 404 (gated) | 404 (gated) |\n| Web `/attachments/{uuid}` | **200 LEAKS** | **200 LEAKS** |\n| Web `/{owner}/{repo}/attachments/{uuid}` | **200 LEAKS** | **200 LEAKS** |\n| Web `/{owner}/{repo}/releases/attachments/{uuid}` | **200 LEAKS** | **200 LEAKS** |\n| Web `browser_download_url` (as returned by API) | **200 LEAKS** | **200 LEAKS** |\n\n### Impact\n\n**Vulnerability class:** Missing authorization (CWE-862) on a parallel code path that was overlooked when the same authorization check was added in a separate handler. This is an **incomplete fix for CVE-2026-27660**.\n\n**Why this is an exploitable vulnerability, not a \"configure it differently\" issue:**\n\nThe Gitea draft-release feature exists for exactly one purpose: stage release content that is not yet meant to be public. The fix in PR #36659 (CVE-2026-27660) explicitly stated *\"Draft release and its attachments need a write permission to access\"* and accordingly gated `GET /api/v1/repos/.../releases/{id}` and `GET /api/v1/repos/.../releases/{id}/assets/{aid}` behind `canAccessReleaseDraft`. The web-side `ServeAttachment` handler (which is reachable from three separate routes on the same host as the API and serves the same underlying attachment object) was not updated. The result is that the security promise communicated to operators (\"draft attachments are visible only to repo writers\") is silently false on the web URLs that the API itself hands out in `browser_download_url`.\n\nThe maintainer cannot reframe this as \"UUID is a capability token\" because Gitea has already explicitly **rejected** that model on the API surface for this exact resource class two months ago. The threat model is identical; only the handler is different.\n\n**Real-world content that leaks under this bug:**\n\nDraft releases are routinely used to stage:\n\n- **Pre-release signed binaries** (Windows MSIs, macOS notarized DMGs, Linux RPM/DEB) before publication: unauthenticated download of unannounced builds.\n- **Security-fix release candidates**: pre-disclosure window for downstream patching, exploitable if the binary diff reveals the bug.\n- **Internal SBOMs, signing manifests, third-party license bundles**: supply-chain reconnaissance.\n- **Release-key public-blob bundles, attestation files**: key-rotation tracking by external observers.\n- **Build artifacts pinned to draft tags by CI pipelines that publish-on-merge**: access to artifacts the release engineer hasn\u0027t decided to ship.\n- **CHANGELOG / release-notes drafts**: pre-disclosure of upcoming features or vulns.\n\nThese are not hypothetical use cases. They are the documented and intended use of the draft-release feature on every git forge.\n\n**Realistic attack scenarios (insider-leak threat model, same as CVE-2026-27660):**\n\n1. **Browser-UI \"Copy link\" causes the URL to leave the trust boundary.** A release engineer is preparing the next release and copies the `browser_download_url` to test the binary on a fresh VM, then pastes it into a Slack thread, a Jira ticket, an email to QA, or a commit message (\"`# binary: $URL`\"). Anyone who later reads that channel (including ex-employees, contractors who lost write access, or anyone scraping public Slack archives) has anonymous, unauthenticated, indefinite access to the draft binary.\n\n2. **Reverse-proxy or observability stack records the URL.** nginx, Caddy, HAProxy, Cloudflare, Datadog, Splunk, ELK: any HTTP-instrumentation pipeline records request paths. Anyone with log read access can extract UUIDs and pull the underlying attachment without authenticating to Gitea at all. For ELT pipelines that copy logs to cloud buckets or data lakes, that read access can be very broad.\n\n3. **Browser history, Referer, extension telemetry.** Once an authorized user downloads a draft attachment, the UUID-bearing URL lives in browser history, optional cloud-synced history (Chrome Sync, Edge Sync, Firefox Sync, recoverable on any signed-in device), browser extension telemetry, and any `Referer` header sent if the URL is loaded in a frame or via an inline asset.\n\n4. **Search-engine and mirror indexing.** Internal portals, asset inventories, dependency scanners, and SaaS supply-chain tools that follow `browser_download_url` to index release artifacts will index the draft URL just like a published one. Once indexed, the URL is discoverable for as long as the index lives.\n\n5. **Embedded links in public content.** A draft-release-attachment URL pasted into an issue comment, a PR description, a wiki page, or a README is rendered as a clickable `\u003ca href\u003e` to any reader of that public page. Readers don\u0027t see the draft release itself but get the attachment behind the link they click.\n\n**Severity calibration via direct precedent:**\n\n| Property | CVE-2026-27660 (this finding\u0027s API mirror) | This finding |\n|---|---|---|\n| Vulnerability class | Missing authorization on draft release | Missing authorization on draft release attachments |\n| Attack vector | Network | Network |\n| Privileges required | None (relies on UUID/ID being leaked) | None (relies on UUID being leaked) |\n| Attack complexity | High (must obtain UUID/ID) | High (must obtain UUID) |\n| Confidentiality | High | High |\n| Integrity / Availability | None | None |\n| Fix complexity | ~5-line authz check added at handler entry | ~5-line authz check added at handler entry |\n| Severity assigned by upstream | Medium | **Should be Medium (5.9) by direct precedent** |\n\nIf CVE-2026-27660 was accepted as a Medium-severity security advisory worth a dedicated PR, an identical bug in the web mirror of the same data is also Medium-severity. The maintainer cannot consistently rate this lower without retroactively downgrading their own previous fix.\n\n**CVSS 3.1:** `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N` = **5.9 / Medium**\n\n- `AV:N`: reachable over the network.\n- `AC:H`: attacker must obtain the UUID via a leak channel (same prerequisite class as the upstream CVE).\n- `PR:N`: no authentication required (anonymous works).\n- `UI:N`: no user interaction required.\n- `S:U`: scope unchanged (still bounded to Gitea\u0027s auth boundary; the draft release was supposed to be inside that boundary but isn\u0027t).\n- `C:H`: full confidentiality breach of the attachment contents.\n- `I:N` / `A:N`: read-only.\n\n**Out of scope:** brute-forcing the UUID is infeasible (122 bits of UUIDv4 entropy). This is a confidentiality-loss bug, not an integrity or availability bug.\n\n**Deployment scale:** Gitea is a top-three self-hosted forge (~30 k+ public Internet-reachable instances per Shodan, plus very large numbers of internal corporate deployments and Codeberg / Forgejo derivatives that inherit the same code). The bug is present in the default configuration; no operator action is required to make a deployment vulnerable.\n\n**Fix complexity:** trivial. Add a `release.IsDraft \u0026\u0026 !perm.CanWrite(unit.TypeReleases)` check in `ServeAttachment` (single function, ~5 lines added). Patch is provided in the Details section. No data migration, no UX change, no breaking-API change.",
"id": "GHSA-q9pg-jj6x-j9p6",
"modified": "2026-07-21T20:19:25Z",
"published": "2026-07-21T20:19:25Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/go-gitea/gitea/security/advisories/GHSA-q9pg-jj6x-j9p6"
},
{
"type": "WEB",
"url": "https://github.com/go-gitea/gitea/pull/38318"
},
{
"type": "WEB",
"url": "https://github.com/go-gitea/gitea/pull/38325"
},
{
"type": "WEB",
"url": "https://github.com/go-gitea/gitea/commit/ab10e37acf7fabf7829a485cc3e13d118638a856"
},
{
"type": "WEB",
"url": "https://github.com/go-gitea/gitea/commit/f7fd51022495737cf960b8c4053a27d69148f664"
},
{
"type": "PACKAGE",
"url": "https://github.com/go-gitea/gitea"
},
{
"type": "WEB",
"url": "https://github.com/go-gitea/gitea/releases/tag/v1.27.0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "Gitea: draft release attachment disclosure via missing web authorization"
}
GHSA-Q9RP-PMHM-W9F4
Vulnerability from github – Published: 2025-01-07 00:31 – Updated: 2025-01-23 18:31The com.glitter.caller.screen (aka iCaller, Caller Theme & Dialer) application through 1.1 for Android enables any application (with no permissions) to place phone calls without user interaction by sending a crafted intent via the com.glitter.caller.screen.DialerActivity component.
{
"affected": [],
"aliases": [
"CVE-2024-53931"
],
"database_specific": {
"cwe_ids": [
"CWE-732"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-01-06T22:15:10Z",
"severity": "CRITICAL"
},
"details": "The com.glitter.caller.screen (aka iCaller, Caller Theme \u0026 Dialer) application through 1.1 for Android enables any application (with no permissions) to place phone calls without user interaction by sending a crafted intent via the com.glitter.caller.screen.DialerActivity component.",
"id": "GHSA-q9rp-pmhm-w9f4",
"modified": "2025-01-23T18:31:13Z",
"published": "2025-01-07T00:31:39Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-53931"
},
{
"type": "WEB",
"url": "https://github.com/actuator/com.glitter.caller.screen/blob/main/CVE-2024-53931"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-Q9X6-PV9G-WXXX
Vulnerability from github – Published: 2022-05-13 01:14 – Updated: 2022-05-13 01:14IBM Security Access Manager Appliance 8.0.0 and 9.0.0 specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors. IBM X-Force ID: 128378.
{
"affected": [],
"aliases": [
"CVE-2017-1459"
],
"database_specific": {
"cwe_ids": [
"CWE-732"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-01-10T17:29:00Z",
"severity": "MODERATE"
},
"details": "IBM Security Access Manager Appliance 8.0.0 and 9.0.0 specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors. IBM X-Force ID: 128378.",
"id": "GHSA-q9x6-pv9g-wxxx",
"modified": "2022-05-13T01:14:05Z",
"published": "2022-05-13T01:14:05Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-1459"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/128378"
},
{
"type": "WEB",
"url": "http://www.ibm.com/support/docview.wss?uid=swg22012331"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id/1040170"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-QC2V-FRQ4-W9PJ
Vulnerability from github – Published: 2024-02-02 09:30 – Updated: 2024-02-02 09:30Incorrect Permission Assignment for Critical Resource vulnerability in B&R Industrial Automation Automation Studio allows Privilege Escalation.This issue affects Automation Studio: from 4.6.0 through 4.6.X, from 4.7.0 before 4.7.7 SP, from 4.8.0 before 4.8.6 SP, from 4.9.0 before 4.9.4 SP.
{
"affected": [],
"aliases": [
"CVE-2020-24681"
],
"database_specific": {
"cwe_ids": [
"CWE-732"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-02-02T07:15:07Z",
"severity": "HIGH"
},
"details": "Incorrect Permission Assignment for Critical Resource vulnerability in B\u0026R Industrial Automation Automation Studio allows Privilege Escalation.This issue affects Automation Studio: from 4.6.0 through 4.6.X, from 4.7.0 before 4.7.7 SP, from 4.8.0 before 4.8.6 SP, from 4.9.0 before 4.9.4 SP.\n\n",
"id": "GHSA-qc2v-frq4-w9pj",
"modified": "2024-02-02T09:30:19Z",
"published": "2024-02-02T09:30:19Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-24681"
},
{
"type": "WEB",
"url": "https://www.br-automation.com/fileadmin/2021-14-BR-AS-NET-PVI-Service-Issues-c3710fbf.pdf"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-QC7R-VRF5-G6M3
Vulnerability from github – Published: 2022-05-24 17:16 – Updated: 2022-05-24 17:16BMC Control-M/Agent 7.0.00.000 has an Insecure File Copy.
{
"affected": [],
"aliases": [
"CVE-2019-19216"
],
"database_specific": {
"cwe_ids": [
"CWE-732"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2020-04-30T14:15:00Z",
"severity": "HIGH"
},
"details": "BMC Control-M/Agent 7.0.00.000 has an Insecure File Copy.",
"id": "GHSA-qc7r-vrf5-g6m3",
"modified": "2022-05-24T17:16:57Z",
"published": "2022-05-24T17:16:57Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-19216"
},
{
"type": "WEB",
"url": "https://herolab.usd.de/security-advisories/usd-2019-0060"
}
],
"schema_version": "1.4.0",
"severity": []
}
Mitigation
When using a critical resource such as a configuration file, check to see if the resource has insecure permissions (such as being modifiable by any regular user) [REF-62], and generate an error or even exit the software if there is a possibility that the resource could have been modified by an unauthorized party.
Mitigation
Divide the software into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully defining distinct user groups, privileges, and/or roles. Map these against data, functionality, and the related resources. Then set the permissions accordingly. This will allow you to maintain more fine-grained control over your resources. [REF-207]
Mitigation MIT-22
Strategy: Sandbox or Jail
- Run the code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by the software.
- OS-level examples include the Unix chroot jail, AppArmor, and SELinux. In general, managed code may provide some protection. For example, java.io.FilePermission in the Java SecurityManager allows the software to specify restrictions on file operations.
- This may not be a feasible solution, and it only limits the impact to the operating system; the rest of the application may still be subject to compromise.
- Be careful to avoid CWE-243 and other weaknesses related to jails.
Mitigation
During program startup, explicitly set the default permissions or umask to the most restrictive setting possible. Also set the appropriate permissions during program installation. This will prevent you from inheriting insecure permissions from any user who installs or runs the program.
Mitigation
For all configuration files, executables, and libraries, make sure that they are only readable and writable by the software's administrator.
Mitigation
Do not suggest insecure configuration changes in documentation, especially if those configurations can extend to resources and other programs that are outside the scope of the application.
Mitigation
Do not assume that a system administrator will manually change the configuration to the settings that are recommended in the software's manual.
Mitigation MIT-37
Strategy: Environment Hardening
Ensure that the software runs properly under the United States Government Configuration Baseline (USGCB) [REF-199] or an equivalent hardening configuration guide, which many organizations use to limit the attack surface and potential risk of deployed software.
Mitigation
When storing data in the cloud (e.g., S3 buckets, Azure blobs, Google Cloud Storage, etc.), use the provider's controls to disable public access.
CAPEC-1: Accessing Functionality Not Properly Constrained by ACLs
In applications, particularly web applications, access to functionality is mitigated by an authorization framework. This framework maps Access Control Lists (ACLs) to elements of the application's functionality; particularly URL's for web apps. In the case that the administrator failed to specify an ACL for a particular element, an attacker may be able to access it with impunity. An attacker with the ability to access functionality not properly constrained by ACLs can obtain sensitive information and possibly compromise the entire application. Such an attacker can access resources that must be available only to users at a higher privilege level, can access management sections of the application, or can run queries for data that they otherwise not supposed to.
CAPEC-122: Privilege Abuse
An adversary is able to exploit features of the target that should be reserved for privileged users or administrators but are exposed to use by lower or non-privileged accounts. Access to sensitive information and functionality must be controlled to ensure that only authorized users are able to access these resources.
CAPEC-127: Directory Indexing
An adversary crafts a request to a target that results in the target listing/indexing the content of a directory as output. One common method of triggering directory contents as output is to construct a request containing a path that terminates in a directory name rather than a file name since many applications are configured to provide a list of the directory's contents when such a request is received. An adversary can use this to explore the directory tree on a target as well as learn the names of files. This can often end up revealing test files, backup files, temporary files, hidden files, configuration files, user accounts, script contents, as well as naming conventions, all of which can be used by an attacker to mount additional attacks.
CAPEC-17: Using Malicious Files
An attack of this type exploits a system's configuration that allows an adversary to either directly access an executable file, for example through shell access; or in a possible worst case allows an adversary to upload a file and then execute it. Web servers, ftp servers, and message oriented middleware systems which have many integration points are particularly vulnerable, because both the programmers and the administrators must be in synch regarding the interfaces and the correct privileges for each interface.
CAPEC-180: Exploiting Incorrectly Configured Access Control Security Levels
An attacker exploits a weakness in the configuration of access controls and is able to bypass the intended protection that these measures guard against and thereby obtain unauthorized access to the system or network. Sensitive functionality should always be protected with access controls. However configuring all but the most trivial access control systems can be very complicated and there are many opportunities for mistakes. If an attacker can learn of incorrectly configured access security settings, they may be able to exploit this in an attack.
CAPEC-206: Signing Malicious Code
The adversary extracts credentials used for code signing from a production environment and then uses these credentials to sign malicious content with the developer's key. Many developers use signing keys to sign code or hashes of code. When users or applications verify the signatures are accurate they are led to believe that the code came from the owner of the signing key and that the code has not been modified since the signature was applied. If the adversary has extracted the signing credentials then they can use those credentials to sign their own code bundles. Users or tools that verify the signatures attached to the code will likely assume the code came from the legitimate developer and install or run the code, effectively allowing the adversary to execute arbitrary code on the victim's computer. This differs from CAPEC-673, because the adversary is performing the code signing.
CAPEC-234: Hijacking a privileged process
An adversary gains control of a process that is assigned elevated privileges in order to execute arbitrary code with those privileges. Some processes are assigned elevated privileges on an operating system, usually through association with a particular user, group, or role. If an attacker can hijack this process, they will be able to assume its level of privilege in order to execute their own code.
CAPEC-60: Reusing Session IDs (aka Session Replay)
This attack targets the reuse of valid session ID to spoof the target system in order to gain privileges. The attacker tries to reuse a stolen session ID used previously during a transaction to perform spoofing and session hijacking. Another name for this type of attack is Session Replay.
CAPEC-61: Session Fixation
The attacker induces a client to establish a session with the target software using a session identifier provided by the attacker. Once the user successfully authenticates to the target software, the attacker uses the (now privileged) session identifier in their own transactions. This attack leverages the fact that the target software either relies on client-generated session identifiers or maintains the same session identifiers after privilege elevation.
CAPEC-62: Cross Site Request Forgery
An attacker crafts malicious web links and distributes them (via web pages, email, etc.), typically in a targeted manner, hoping to induce users to click on the link and execute the malicious action against some third-party application. If successful, the action embedded in the malicious link will be processed and accepted by the targeted application with the users' privilege level. This type of attack leverages the persistence and implicit trust placed in user session cookies by many web applications today. In such an architecture, once the user authenticates to an application and a session cookie is created on the user's system, all following transactions for that session are authenticated using that cookie including potential actions initiated by an attacker and simply "riding" the existing session cookie.
CAPEC-642: Replace Binaries
Adversaries know that certain binaries will be regularly executed as part of normal processing. If these binaries are not protected with the appropriate file system permissions, it could be possible to replace them with malware. This malware might be executed at higher system permission levels. A variation of this pattern is to discover self-extracting installation packages that unpack binaries to directories with weak file permissions which it does not clean up appropriately. These binaries can be replaced by malware, which can then be executed.