CVE-2026-40481: Github.com/monetr/monetr Security Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-v7xq-3wx6-fqc2
CVSS 7.5
CWE-400 CWE-770
Published
Advisory Summary

CVE-2026-40481 is a HIGH (CVSS 7.5) security vulnerability vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Github.com/monetr/monetr libraries in the Go ecosystem. The issue involves in monetr, unauthenticated stripe webhook reads attacker-sized request bodies before signature validation. Remediation is available by upgrading affected packages to version 1.12.4.

CVE-2026-40481 at a Glance

CVE Identifier CVE-2026-40481
GHSA Identifier GHSA-v7xq-3wx6-fqc2
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Github.com/monetr/monetr
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-40481

To remediate this vulnerability, upgrade all affected Github.com/monetr/monetr dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/monetr/monetr fixed: 1.12.4
Upgrade github.com/monetr/monetr to 1.12.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/monetr/monetr

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-40481, inspect your project dependencies for Github.com/monetr/monetr:

inspect dependencies for github.com/monetr/monetr

Analyze the terminal output to locate any version of Github.com/monetr/monetr in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.12.4), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Github.com/monetr/monetr, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary The public Stripe webhook endpoint fully reads the request body into memory before validating the Stripe signature. A remote unauthenticated attacker can send oversized POST bodies and cause substantial memory growth, leading to denial of service. ### Details When Stripe webhooks are enabled, the Stripe webhook route is reachable without authentication. The handler only requires that a `Stripe-Signature` header be present, then buffers the entire request body in memory and only afterward attempts Stripe signature verification. Because body buffering happens before signature validation, memory consumption is controlled by the attacker-supplied payload size even when the signature is invalid. Large requests or repeated requests can exhaust available memory and make the service unresponsive or crash. This issue depends on Stripe webhooks being enabled. If an upstream proxy or load balancer already enforces a strict request-body limit smaller than the attacker payload, exploitability is reduced accordingly. ### PoC ```bash URL="http://127.0.0.1:4000/api/stripe/webhook" PROC_NAME="monetr" TOTAL_KIB="$(awk '/MemTotal:/ {print $2}' /proc/meminfo)" python3 - <<'PY' | curl -s -o /dev/null \ --limit-rate 10m \ -H 'Stripe-Signature: t=1,v1=deadbeef' \ --data-binary @- \ "$URL" & import sys sys.stdout.buffer.write(b"A" * (256 * 1024 * 1024)) PY REQ_PID=$! while kill -0 "$REQ_PID" 2>/dev/null; do ps -C "$PROC_NAME" -o rss=,%cpu= | awk -v total="$TOTAL_KIB" ' { printf "%s mem=%.2fMiB / %.3fGiB cpu=%s%%\n", "'"$PROC_NAME"'", $1/1024, total/1024/1024, $2 } ' sleep 1 done wait "$REQ_PID" # monetr mem rises substantially while processing the invalid webhook body before signature validation fails ``` ### Impact - Type: Denial of service / uncontrolled resource consumption (CWE-400) - Who is impacted: Internet-reachable monetr deployments that have both Stripe billing and Stripe webhooks enabled (Stripe.Enabled and Stripe.WebhooksEnabled). In practice this is the hosted/SaaS configuration. Self-hosted instances are very unlikely to be affected, because Stripe billing is opt-in, is not part of a typical self-hosted setup, and the webhook route short-circuits to 404 when it is not enabled; meaning the unbounded read is unreachable on a default self-hosted deployment. - Security impact: A remote, unauthenticated attacker can cause the monetr server process to buffer attacker-controlled payloads into memory before any signature validation occurs. Sufficiently large or repeated requests can drive memory consumption high enough to make the API unresponsive or crash the process, denying service to all legitimate users of the affected instance — not just users of the billing surface. - Attack preconditions: The attacker must be able to reach the /api/stripe/webhook endpoint over the network and the target instance must have Stripe webhooks enabled. No authentication, prior account, user interaction, or knowledge of the Stripe webhook secret is required. Exploitability is reduced (and may be effectively eliminated) on deployments where an upstream proxy or load balancer enforces a request-body size limit smaller than the attacker's payload.

CVE-2026-40481 Affected Github.com/monetr/monetr Versions

1 component(s)
Fixed Versions:
1.12.4
Product / Package Ecosystem Affected Versions Fixed Version
github.com/monetr/monetr
Go
< 1.12.4
1.12.4

References

Frequently Asked Questions

What is CVE-2026-40481?
CVE-2026-40481 is a security vulnerability in Github.com/monetr/monetr involving In monetr, unauthenticated Stripe webhook reads attacker-sized request bodies before signature validation under CWE-400: Uncontrolled Resource Consumption.
Which Github.com/monetr/monetr versions are affected?
Affected versions include releases prior to 1.12.4 across affected packages: github.com/monetr/monetr.
What version fixes CVE-2026-40481?
Upgrading to 1.12.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/monetr/monetr affected?
Yes, github.com/monetr/monetr is affected in releases prior to 1.12.4. Upgrade your dependency to 1.12.4 or later.
What is the CVSS score of CVE-2026-40481?
CVE-2026-40481 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-40481?
CVE-2026-40481 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check Go dependencies for CVE-2026-40481?
Run the dependency tree command: 'inspect dependencies for github.com/monetr/monetr'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-v7xq-3wx6-fqc2",
  "modified" : "2026-04-24T20:50:58Z",
  "published" : "2026-04-14T00:03:36Z",
  "aliases" : [ "CVE-2026-40481" ],
  "summary" : "In monetr, unauthenticated Stripe webhook reads attacker-sized request bodies before signature validation",
  "details" : "### Summary\n\nThe public Stripe webhook endpoint fully reads the request body into memory before validating the Stripe signature. A remote unauthenticated attacker can send oversized POST bodies and cause substantial memory growth, leading to denial of service.\n\n### Details\n\nWhen Stripe webhooks are enabled, the Stripe webhook route is reachable without authentication. The handler only requires that a `Stripe-Signature` header be present, then buffers the entire request body in memory and only afterward attempts Stripe signature verification.\n\nBecause body buffering happens before signature validation, memory consumption is controlled by the attacker-supplied payload size even when the signature is invalid. Large requests or repeated requests can exhaust available memory and make the service unresponsive or crash.\n\nThis issue depends on Stripe webhooks being enabled. If an upstream proxy or load balancer already enforces a strict request-body limit smaller than the attacker payload, exploitability is reduced accordingly.\n\n### PoC\n\n```bash\nURL=\"http://127.0.0.1:4000/api/stripe/webhook\"\nPROC_NAME=\"monetr\"\nTOTAL_KIB=\"$(awk '/MemTotal:/ {print $2}' /proc/meminfo)\"\n\npython3 - <<'PY' | curl -s -o /dev/null \\\n  --limit-rate 10m \\\n  -H 'Stripe-Signature: t=1,v1=deadbeef' \\\n  --data-binary @- \\\n  \"$URL\" &\nimport sys\nsys.stdout.buffer.write(b\"A\" * (256 * 1024 * 1024))\nPY\nREQ_PID=$!\n\nwhile kill -0 \"$REQ_PID\" 2>/dev/null; do\n  ps -C \"$PROC_NAME\" -o rss=,%cpu= | awk -v total=\"$TOTAL_KIB\" '\n    {\n      printf \"%s mem=%.2fMiB / %.3fGiB cpu=%s%%\\n\", \"'\"$PROC_NAME\"'\", $1/1024, total/1024/1024, $2\n    }\n  '\n  sleep 1\ndone\n\nwait \"$REQ_PID\"\n# monetr mem rises substantially while processing the invalid webhook body before signature validation fails\n```\n\n### Impact\n\n- Type: Denial of service / uncontrolled resource consumption (CWE-400)\n- Who is impacted: Internet-reachable monetr deployments that have both Stripe billing and Stripe webhooks enabled\n  (Stripe.Enabled and Stripe.WebhooksEnabled). In practice this is the hosted/SaaS configuration. Self-hosted instances\n  are very unlikely to be affected, because Stripe billing is opt-in, is not part of a typical self-hosted setup, and\n  the webhook route short-circuits to 404 when it is not enabled; meaning the unbounded read is unreachable on a default\n  self-hosted deployment.\n- Security impact: A remote, unauthenticated attacker can cause the monetr server process to buffer attacker-controlled\n  payloads into memory before any signature validation occurs. Sufficiently large or repeated requests can drive memory\n  consumption high enough to make the API unresponsive or crash the process, denying service to all legitimate users of\n  the affected instance — not just users of the billing surface.\n- Attack preconditions: The attacker must be able to reach the /api/stripe/webhook endpoint over the network and the\n  target instance must have Stripe webhooks enabled. No authentication, prior account, user interaction, or knowledge of\n  the Stripe webhook secret is required. Exploitability is reduced (and may be effectively eliminated) on deployments\n  where an upstream proxy or load balancer enforces a request-body size limit smaller than the attacker's payload.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/monetr/monetr"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.12.4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.12.3"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/monetr/monetr/security/advisories/GHSA-v7xq-3wx6-fqc2"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-40481"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/monetr/monetr"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/monetr/monetr/releases/tag/v1.12.4"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400", "CWE-770" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-14T00:03:36Z",
    "nvd_published_at" : "2026-04-17T23:16:12Z"
  }
}