{"id":"VND-nodejs-july-2024-security-releases","kind":"vulnerability","aliases":[],"related":["CVE-2024-22018","CVE-2024-22020","CVE-2024-27980","CVE-2024-36137","CVE-2024-36138","CVE-2024-37372"],"title":"Node.js: Monday, July 8, 2024 Security Releases","description":"Commercial support for versions past the Maintenance LTS phase is available through our OpenJS Ecosystem Sustainability Program partners Monday, July 8, 2024 Security Releases RG Rafael Gonzaga Monday, July 8, 2024 Security Releases Security releases available\nUpdates are now available for the 22.x, 20.x, 18.x Node.js release lines for the\nfollowing issues.\nBypass incomplete fix of CVE-2024-27980 (CVE-2024-36138) - (High)\nThe CVE-2024-27980 was identified as an incomplete fix for the BatBadBut vulnerability.\nThis vulnerability arises from improper handling of batch files with all\npossible extensions on Windows via child_process.spawn / child_process.spawnSync .\nA malicious command line argument can inject arbitrary commands and achieve code execution\neven if the shell option is not enabled.\nThis vulnerability affects all users of child_process.spawn and child_process.spawnSync\non Windows in all active release lines.\nImpact:\nThis vulnerability affects all Windows users in active release lines: 22.x, 20.x, 18.x\nThank you, to tianst for reporting this vulnerability and thank you RafaelGSS for fixing it.\nBypass network import restriction via data URL (CVE-2024-22020) - (Medium)\nA security flaw in Node.js allows a bypass of network import restrictions.\nBy embedding non-network imports in data URLs, an attacker can execute arbitrary code, compromising system security.\nVerified on various platforms, the vulnerability is mitigated by forbidding data URLs in network imports.\nExploiting this flaw can violate network import security, posing a risk to developers and servers.\nImpact:\nThis vulnerability affects all users in active release lines: 22.x, 20.x, 18.x\nThank you, to dittyroma for reporting this vulnerability and thank you RafaelGSS for fixing it.\nfs.fchown/fchmod bypasses permission model (CVE-2024-36137) - (Low)\nA vulnerability has been identified in Node.js, affecting users of the experimental\npermission model when the --allow-fs-write flag is used.\nNode.js Permission Model do not operate on file descriptors, however, operations such\nas fs.fchown or fs.fchmod can use a &quot;read-only&quot; file descriptor to change the\nowner and permissions of a file.\nThis vulnerability affects all users using the experimental permission model in Node.js 20 and Node.js 22.\nPlease note that at the time this CVE was issued, the permission model is an experimental feature of Node.js.\nImpact:\nThis vulnerability affects all users in active release lines: 22.x, 20.x\nThank you, to 4xpl0r3r for reporting this vulnerability and thank you RafaelGSS for fixing it.\nfs.lstat bypasses permission model (CVE-2024-22018) - (Low)\nA vulnerability has been identified in Node.js, affecting users of the experimental permission model when\nthe --allow-fs-read flag is used.\nThis flaw arises from an inadequate permission model that fails to restrict file stats through the\nfs.lstat API. As a result, malicious actors can retrieve stats from files that they do not have explicit read access to.\nThis vulnerability affects all users using the experimental permission model in Node.js 20 and Node.js 22.\nPlease note that at the time this CVE was issued, the permission model is an experimental feature of Node.js.\nImpact:\nThis vulnerability affects all users in active release lines: 22.x, 20.x\nThank you, to haxatron1 for reporting this vulnerability and thank you RafaelGSS for fixing it.\nPermission model improperly processes UNC paths (CVE-2024-37372) - (low)\nThe Permission Model assumes that any path starting with two backslashes \\ has a four-character prefix that can be ignored, which is not always true. This subtle bug leads to vulnerable edge cases.\nThis vulnerability affects Windows users of the Node.js Permission Model in version v22.x and v20.x\nImpact:\nThis vulnerability affects all users in active release lines: 22.x, 20.x\nThank you, to tniessen for reporting this vulnerability and thank you RafaelGSS for fixing it.\nDownloads and release details\nNode.js v18.20.4\nNode.js v20.15.1\nNode.js v22.4.1\n(Update 04-Jul-2024) Security Release target July 8th\nDue to the U.S. National Holiday on July 4th, the Node.js Security Releases will\nbe available on or shortly after Monday, July 8th, 2024.\nThe release is being postponed to ensure that people have sufficient time to\nupgrade before the weekend, as releasing patches on a holiday would provide\nlimited time for updates.\n(Update 02-Jul-2024) Security Release target July 4th\nThe Node.js Security Releases will be available on, or shortly after, Thursday, July 4th, 2024.\nSummary\nThe Node.js project will release new versions of the 22.x, 20.x, 18.x\nreleases lines on or shortly after, Tuesday, July 2, 2024 in order to address:\n1 high severity issues.\n1 medium severity issues.\n3 low severity issues.\nNode.js fetch will be upgraded to undici v6.19.2 on Node.js 18.x and Node.js 20.x.\nNode.js 22.x already includes undici v6.19.2.\nImpact\nThe 22.x release line of Node.js is vulnerable to 1 high severity issues, 1 medium severity issues, 3 low severity issues.\nThe 20.x release line of Node.js is vulnerable to 1 high severity issues, 1 medium severity issues, 3 low severity issues.\nThe 18.x release line of Node.js is vulnerable to 1 high severity issues, 1 medium severity issues.\nIt&#x27;s important to note that End-of-Life versions are always affected when a security release occurs.\nTo ensure your system&#x27;s security, please use an up-to-date version as outlined in our\nRelease Schedule .\nRelease timing\nReleases will be available on, or shortly after, Tuesday, July 2, 2024.\nContact and future updates\nThe current Node.js security policy can be found at https://nodejs.org/en/security/ .\nPlease follow the process outlined in https://github.com/nodejs/node/blob/master/SECURITY.md if you wish to report a vulnerability in Node.js.\nSubscribe to the low-volume announcement-only nodejs-sec mailing list at https://groups.google.com/forum/#!forum/nodejs-sec to stay up to date on security vulnerabilities and security-r","summary":"Node.js fixes an incomplete patch for BatBadBut (CVE-2024-27980 bypass, CVE-2024-36138), where a malicious command line argument passed to child_process.spawn or spawnSync on Windows can inject arbitrary commands even without the shell option. The release also fixes several lower-severity permission model bypasses (fs.fchown, fs.fchmod, fs.lstat, UNC paths) and a data URL network import bypass (CVE-2024-22020).","severity":"high","cvss":null,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"node","fixed":["18.20.4"],"affected":">= 18.0.0, < 18.20.4","ecosystem":"node"},{"name":"node","fixed":["20.15.1"],"affected":">= 20.0.0, < 20.15.1","ecosystem":"node"},{"name":"node","fixed":["22.4.1"],"affected":">= 22.0.0, < 22.4.1","ecosystem":"node"}],"ecosystems":["node"],"tags":["backend","node","node.js","runtime","self-hosted","windows"],"not_affected_if":["linux-only","macos-only","no-child-process-use"],"how_to_check":"- Run `node --version` on each Windows host and compare against the fixed versions.\n- Search application code for `child_process.spawn` or `child_process.spawnSync` called on Windows with user-controlled arguments.\n- For the permission model issues, check whether the experimental `--allow-fs-read` or `--allow-fs-write` flags are used.","fix":"- Upgrade Node.js 18.x to `18.20.4`, 20.x to `20.15.1`, and 22.x to `22.4.1`.\n- Node.js fetch is upgraded to undici `v6.19.2` on 18.x and 20.x; 22.x already includes it.\n- Rebuild and redeploy applications after upgrading the runtime.","status":"open","published_at":"2024-07-08T03:00:00+00:00","first_seen_at":"2026-10-23T19:13:00+00:00","triaged_at":"2026-10-25T05:39:32+00:00","updated_at":"2026-10-25T05:39:32+00:00","category":"runtime","confidence":0.8,"triage":{"at":"2026-10-25T05:39:32Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade Node.js 18.x to `18.20.4`, 20.x to `20.15.1`, and 22.x to `22.4.1`.\n- Node.js fetch is upgraded to undici `v6.19.2` on 18.x and 20.x; 22.x already includes it.\n- Rebuild and redeploy applications after upgrading the runtime.","reach":"local","title":"Node.js: Windows child_process spawn lets a crafted argument run commands","impact":"high","summary":"Node.js fixes an incomplete patch for BatBadBut (CVE-2024-27980 bypass, CVE-2024-36138), where a malicious command line argument passed to child_process.spawn or spawnSync on Windows can inject arbitrary commands even without the shell option. The release also fixes several lower-severity permission model bypasses (fs.fchown, fs.fchmod, fs.lstat, UNC paths) and a data URL network import bypass (CVE-2024-22020).","category":"runtime","nicknames":["BatBadBut"],"who_cares":["node.js","windows","self-hosted","backend"],"confidence":0.8,"needs_auth":"unknown","worst_case":"Attacker runs arbitrary commands on Windows via spawn arguments","analyst_note":"Confirm how the attacker-controlled argument reaches spawn on Windows and whether the advisory gives a workaround; see https://nodejs.org/en/blog/vulnerability/july-2024-security-releases","how_to_check":"- Run `node --version` on each Windows host and compare against the fixed versions.\n- Search application code for `child_process.spawn` or `child_process.spawnSync` called on Windows with user-controlled arguments.\n- For the permission model issues, check whether the experimental `--allow-fs-read` or `--allow-fs-write` flags are used.","needs_analyst":true,"not_affected_if":["linux-only","macos-only","no-child-process-use"],"who_is_affected":"Every Windows user of Node.js in the 18.x, 20.x and 22.x release lines is affected by the BatBadBut bypass, because it occurs in child_process.spawn and spawnSync regardless of the shell option. The permission model issues only matter if the experimental permission model is enabled, and the data URL bypass applies to all active release lines. End-of-life Node.js versions are always affected by security releases and should be upgraded.","user_interaction":"unknown","needs_special_setup":"no","severity_if_unknown":"high"},"cost_usd":0.000976,"input_tokens":5500,"output_tokens":853,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-2024':36B,40B,88B,150C,153C,158C,265C,366C,494C,628C '-22018':495C '-22020':89B,266C '-27980':37B,151C,159C '-36137':367C '-36138':41B,154C '-37372':629C '/fchmod':361C '18':136C,240C,342C '20':134C,238C,340C,437C,472C,569C,604C,692C '2024':5A,12A,111C,120C '22':132C,236C,338C,440C,470C,572C,602C,690C '4xpl0r3r':477C '8':4A,110C,119C 'access':555C 'achiev':198C 'activ':222C,233C,335C,467C,599C,687C 'actor':542C 'affect':211C,228C,331C,376C,427C,463C,504C,559C,595C,667C,683C 'allow':273C,386C,514C 'allow-fs-read':513C 'allow-fs-writ':385C 'also':66B 'alway':655C 'api':537C 'arbitrari':57B,195C,293C 'argument':47B,192C 'aris':172C,522C 'assum':634C 'attack':290C 'avail':100C,125C,129C 'backend':20B 'backslash':641C 'batbadbut':16A,34B,168C 'batch':177C 'bug':659C 'bypass':38B,74B,86B,145C,257C,275C,362C,490C 'case':664C 'chang':417C 'charact':646C 'child_process.spawn':50B,186C,215C 'child_process.spawnsync':187C,217C 'code':199C,294C 'command':45B,58B,190C,196C 'commerci':90C 'compromis':295C 'cve':35B,39B,87B,149C,152C,157C,264C,365C,448C,493C,580C,627C 'data':82B,262C,287C,308C 'descriptor':400C,415C 'detail':712C 'develop':325C 'dittyroma':347C 'download':709C 'ecosystem':104C 'edg':663C 'embed':281C 'enabl':208C 'even':59B,201C 'execut':200C,292C 'experiment':380C,432C,456C,508C,564C,588C 'explicit':553C 'exploit':313C 'extens':182C 'fail':529C 'featur':457C,589C 'file':178C,399C,414C,424C,532C,547C 'fix':29B,67B,147C,165C,255C,357C,487C,619C,707C 'flag':389C,517C 'flaw':270C,315C,521C 'follow':143C 'forbid':307C 'four':645C 'four-charact':644C 'fs':387C,515C 'fs.fchmod':76B,407C 'fs.fchown':75B,360C,405C 'fs.fchown/fchmod':359C 'fs.lstat':77B,489C,536C 'gonzaga':116C 'handl':175C 'haxatron1':609C 'high':155C 'host':26B 'howev':401C 'identifi':161C,373C,501C 'ignor':651C 'impact':225C,328C,460C,592C,680C 'import':85B,259C,278C,285C,312C,319C 'improp':174C,623C 'inadequ':525C 'incomplet':31B,146C,164C 'inject':56B,194C 'issu':144C,450C,582C 'juli':3A,109C,118C 'july':11A 'lead':660C 'line':46B,140C,191C,224C,235C,337C,469C,601C,689C 'low':368C,496C,630C 'lower':70B 'lower-sever':69B 'lts':97C 'mainten':96C 'malici':44B,189C,541C 'medium':267C 'mitig':305C 'model':73B,364C,382C,394C,434C,453C,492C,510C,527C,566C,585C,622C,633C,674C 'monday':2A,108C,117C 'network':84B,258C,277C,284C,311C,318C 'node':17A,18A,19A,21B 'node.js':1A,22B,28B,138C,272C,375C,392C,436C,439C,459C,503C,568C,571C,591C,672C,713C,715C 'nodejs':10A 'non':283C 'non-network':282C 'note':442C,574C 'openj':103C 'oper':397C,402C 'option':63B,205C 'owner':419C 'partner':107C 'pass':48B 'past':94C 'patch':32B 'path':79B,626C,637C 'permiss':72B,363C,381C,393C,421C,433C,452C,491C,509C,526C,565C,584C,621C,632C,673C 'phase':98C 'platform':301C 'pleas':441C,573C 'pose':321C 'possibl':181C 'prefix':647C 'process':624C 'program':106C 'rafael':115C 'rafaelgss':253C,355C,485C,617C,705C 'read':412C,516C,554C 'read-on':411C 'releas':7A,65B,113C,122C,124C,139C,223C,234C,336C,468C,600C,688C,711C 'releases':15A 'report':247C,349C,479C,611C,699C 'restrict':260C,279C,531C 'result':540C 'retriev':544C 'rg':114C 'risk':323C 'runtim':23B 'secur':6A,112C,121C,123C,269C,297C,320C 'security':14A 'security-releases':13A 'self':25B 'self-host':24B 'server':327C 'sever':68B,71B 'shell':62B,204C 'spawnsync':52B 'start':638C 'stat':533C,545C 'subtl':658C 'support':91C 'sustain':105C 'system':296C 'thank':242C,251C,344C,353C,474C,483C,606C,615C,694C,703C 'tianst':245C 'time':446C,578C 'tniessen':697C 'true':656C 'two':640C 'unc':78B,625C 'updat':126C 'url':83B,263C,288C,309C 'use':391C,409C,430C,519C,562C 'user':213C,231C,333C,377C,429C,465C,505C,561C,597C,669C,685C 'v18.20.4':714C 'v2':716C 'v20.x':679C 'v22.x':677C 'various':300C 'verifi':298C 'version':93C,676C 'via':185C,261C 'violat':317C 'vnd':9A 'vnd-nodejs-july':8A 'vulner':169C,171C,210C,227C,249C,303C,330C,351C,370C,426C,462C,481C,498C,558C,594C,613C,662C,666C,682C,701C 'window':27B,54B,184C,219C,230C,668C 'without':60B 'write':388C 'x':133C,135C,137C,237C,239C,241C,339C,341C,343C,471C,473C,603C,605C,691C,693C","nicknames":["BatBadBut"],"mitigations":[],"who_affected":"Every Windows user of Node.js in the 18.x, 20.x and 22.x release lines is affected by the BatBadBut bypass, because it occurs in child_process.spawn and spawnSync regardless of the shell option. The permission model issues only matter if the experimental permission model is enabled, and the data URL bypass applies to all active release lines. End-of-life Node.js versions are always affected by security releases and should be upgraded.","tier":"A","verified":{},"analyst_revisit_at":null,"first_public_at":"2024-07-08T03:00:00+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"nodejs","external_id":"july-2024-security-releases","url":"https://nodejs.org/en/blog/vulnerability/july-2024-security-releases","severity":"high","published_at":"2024-07-08T03:00:00+00:00","modified_at":null,"first_seen_at":"2026-10-23T19:13:00+00:00","fetched_at":"2026-10-25T21:27:12+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"}