{"id":"CVE-2026-74757","kind":"vulnerability","aliases":["CVE-2026-74757"],"related":[],"title":"Apache bRPC: crafted mcpack request forces huge memory allocation and crash","description":"Uncontrolled resource allocation in the mcpack2pb component in Apache bRPC (version < 1.18.0) on all platforms allows remote attackers to make the server allocate a large amount of memory via sending a crafted mcpack request with a huge array item count.\n\nRoot Cause:\nThe bRPC mcpack2pb parser trusts the item count stored in the mcpack array header without validating it against the actual payload size. The code generated by the mcpack2pb protoc plugin uses this count to preallocate memory for repeated protobuf fields via Reserve(). A malformed request declaring item_count = 0x7fffffff can force the server to preallocate about 16GB of virtual memory, which may abort the process (SIGABRT) on memory-constrained hosts.\n\nAffected Scenarios:\nUse a bRPC server that wires a NsheadService to UbrpcMcpack2Adaptor (the Baidu ubrpc deployment pattern) and parses requests with code generated by the mcpack2pb protoc plugin. The request body is parsed before authentication.\n\nHow to Fix:\n(Choose one of the following options)\n1. Upgrade bRPC to version 1.18.0, which fixes this issue.\n2. Apply this patch:  https://github.com/apache/brpc/pull/3451 \n\nNote:\nNo matter which option you choose, you should know that the fix caps the array item count to the remaining bytes of the array payload.","summary":"A crafted mcpack request with a huge array item count makes the bRPC server preallocate a very large amount of memory, which can abort the process. An unauthenticated remote attacker can trigger it because the body is parsed before authentication.","severity":"high","cvss":null,"epss":0.00242,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["apache-brpc","bpc","c++","nshead","package","ubrpc"],"not_affected_if":["not-using-mcpack2pb","version-1.18.0-or-later"],"how_to_check":"- Check whether the service uses bRPC with `NsheadService` and `UbrpcMcpack2Adaptor` (the ubrpc deployment pattern) and code generated by the mcpack2pb protoc plugin.\n- Check the bRPC version in use; affected versions are below `1.18.0`.","fix":"- Upgrade bRPC to `1.18.0`.\n- Or apply the patch from https://github.com/apache/brpc/pull/3451.","status":"open","published_at":"2026-10-21T12:17:22+00:00","first_seen_at":"2026-10-23T21:57:28+00:00","triaged_at":"2026-10-25T05:02:39+00:00","updated_at":"2026-10-25T05:02:39+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-10-25T05:02:39Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade bRPC to `1.18.0`.\n- Or apply the patch from https://github.com/apache/brpc/pull/3451.","reach":"network","title":"Apache bRPC: crafted mcpack request forces huge memory allocation and crash","impact":"medium","summary":"A crafted mcpack request with a huge array item count makes the bRPC server preallocate a very large amount of memory, which can abort the process. An unauthenticated remote attacker can trigger it because the body is parsed before authentication.","category":"package","nicknames":[],"who_cares":["bpc","apache-brpc","c++","nshead","ubrpc"],"confidence":0.8,"needs_auth":"no","worst_case":"Remote request forces memory exhaustion and the server process aborts.","analyst_note":"","how_to_check":"- Check whether the service uses bRPC with `NsheadService` and `UbrpcMcpack2Adaptor` (the ubrpc deployment pattern) and code generated by the mcpack2pb protoc plugin.\n- Check the bRPC version in use; affected versions are below `1.18.0`.","needs_analyst":false,"not_affected_if":["not-using-mcpack2pb","version-1.18.0-or-later"],"who_is_affected":"Servers built on bRPC that expose an nshead service through UbrpcMcpack2Adaptor and parse requests with mcpack2pb-generated code. The request body is parsed before authentication, so the attack needs no credentials. Services that do not use the mcpack2pb path, or that run newer than 1.18.0, are not affected.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"high"},"cost_usd":0.000664,"input_tokens":3724,"output_tokens":583,"severity_before":"unknown"},"analyst_status":null,"analyst_note":null,"search":"'-2026':13A,16A '-74757':14A,17A '/apache/brpc/pull/3451':239C '0x7fffffff':156C '1':223C '1.18.0':77C,228C '16gb':164C '2':233C 'abort':49B,170C 'actual':127C 'affect':179C 'alloc':9A,68C,88C 'allow':81C 'amount':44B,91C 'apach':1A,19B,74C 'apache-brpc':18B 'appli':234C 'array':33B,103C,120C,255C,264C 'attack':55B,83C 'authent':65B,213C 'baidu':192C 'bodi':61B,209C 'bpc':21B 'brpc':2A,20B,38B,75C,109C,183C,225C 'byte':261C 'c':22B 'cap':253C 'caus':107C 'choos':217C,246C 'code':131C,200C 'compon':72C 'constrain':177C 'count':35B,105C,115C,140C,155C,257C 'craft':3A,27B,97C 'crash':11A 'cve':12A,15A 'declar':153C 'deploy':194C 'field':147C 'fix':216C,230C,252C 'follow':221C 'forc':6A,158C 'generat':132C,201C 'github.com':238C 'github.com/apache/brpc/pull/3451':237C 'header':121C 'host':178C 'huge':7A,32B,102C 'issu':232C 'item':34B,104C,114C,154C,256C 'know':249C 'larg':43B,90C 'make':36B,85C 'malform':151C 'matter':242C 'may':169C 'mcpack':4A,28B,98C,119C 'mcpack2pb':71C,110C,135C,204C 'memori':8A,46B,93C,143C,167C,176C 'memory-constrain':175C 'note':240C 'nshead':23B 'nsheadservic':188C 'one':218C 'option':222C,244C 'packag':24B 'pars':63B,197C,211C 'parser':111C 'patch':236C 'pattern':195C 'payload':128C,265C 'platform':80C 'plugin':137C,206C 'prealloc':40B,142C,162C 'process':51B,172C 'protobuf':146C 'protoc':136C,205C 'remain':260C 'remot':54B,82C 'repeat':145C 'request':5A,29B,99C,152C,198C,208C 'reserv':149C 'resourc':67C 'root':106C 'scenario':180C 'send':95C 'server':39B,87C,160C,184C 'sigabrt':173C 'size':129C 'store':116C 'trigger':57B 'trust':112C 'ubrpc':25B,193C 'ubrpcmcpack2adaptor':190C 'unauthent':53B 'uncontrol':66C 'upgrad':224C 'use':138C,181C 'valid':123C 'version':76C,227C 'via':94C,148C 'virtual':166C 'wire':186C 'without':122C","nicknames":[],"mitigations":[],"who_affected":"Servers built on bRPC that expose an nshead service through UbrpcMcpack2Adaptor and parse requests with mcpack2pb-generated code. The request body is parsed before authentication, so the attack needs no credentials. Services that do not use the mcpack2pb path, or that run newer than 1.18.0, are not affected.","tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-21T12:17:22+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-74757","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-74757","severity":null,"published_at":"2026-10-21T12:17:22+00:00","modified_at":"2026-10-22T16:56:37+00:00","first_seen_at":"2026-10-23T21:57:28+00:00","fetched_at":"2026-10-23T22:29:01+00:00","note":null},{"source":"epss","external_id":"CVE-2026-74757","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-74757","severity":null,"published_at":null,"modified_at":null,"first_seen_at":"2026-10-24T13:15:54+00:00","fetched_at":"2026-10-24T13:15:54+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}