{"id":"GHSA-6p47-hr8r-4wq6","kind":"package","aliases":["GHSA-6p47-hr8r-4wq6","MAL-2026-5644"],"related":[],"title":"Malicious code in self-certificate (npm)","description":"---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (ab587fcd5a0b45e17454fc742007b8b597a0aec49b443d8a5a087ba910ea4a40)\nThe package presents itself as a self-signed certificate generator, but its public generateCertificates() API path loads sample/cert.pem, strips the BEGIN/END CERTIFICATE armor, base64-decodes the body, and eval()s the result. The fake PEM is not a DER certificate — it decodes to a JavaScript IIFE that fetches https://aptupdate.org/settings/privacy.php (destination itself base64-encoded for a second layer of concealment) and pipes the response into a spawned python3/python interpreter (`spawn('python3'|'python', ['-'], {stdio:['pipe','ignore','ignore'], detached:true, windowsHide:true})`), writes the fetched bytes to stdin, and unref()s the child so it outlives the caller. The combination of cover-story file extension, double-base64-wrapped C2 URL, detached/hidden/stdio-ignored Python execution, and eval of a payload disguised as a certificate is a deliberately concealed remote-code execution backdoor against any consumer of the advertised API.\n\n## Source: ghsa-malware (f25ae1f9b9e110e14678c136b0b03beadb230b26f03ebff7618d3e9cda139aa2)\nAny computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.","summary":null,"severity":"critical","cvss":null,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"self-certificate","note":"all versions","fixed":[],"affected":"","ecosystem":"npm"}],"ecosystems":["npm"],"tags":["malicious","package"],"not_affected_if":[],"how_to_check":null,"fix":null,"status":"open","published_at":"2026-06-11T13:02:34+00:00","first_seen_at":"2026-11-12T15:38:50+00:00","triaged_at":"2026-11-12T15:38:56+00:00","updated_at":"2026-11-12T15:38:56+00:00","category":"package","confidence":null,"triage":null,"analyst_status":null,"analyst_note":null,"search":"'-2026':14A '-5644':15A '/settings/privacy.php':92C '4wq6':12A,20A '6p47':10A,18A 'ab587fcd5a0b45e17454fc742007b8b597a0aec49b443d8a5a087ba910ea4a40':39C 'advertis':180C 'amazon':37C 'amazon-inspector':36C 'api':55C,181C 'aptupdate.org':91C 'aptupdate.org/settings/privacy.php':90C 'armor':63C 'backdoor':174C 'base64':65C,96C,150C 'base64-decodes':64C 'base64-encoded':95C 'begin/end':61C 'bodi':68C 'byte':127C 'c2':152C 'caller':139C 'certif':6A,49C,62C,81C,165C 'certificate':23A 'child':134C 'code':2A,172C 'combin':141C 'compromis':200C 'comput':188C,208C,216C,228C 'conceal':103C,169C 'consid':198C 'consum':177C 'control':225C 'cover':144C 'cover-stori':143C 'decod':66C,83C 'deliber':168C 'der':80C 'destin':93C 'detach':120C 'detached/hidden/stdio-ignored':154C 'detail':28C 'differ':215C 'disguis':162C 'doubl':149C 'double-base64-wrapped':148C 'edit':31C 'encod':97C 'entiti':236C 'eval':70C,158C 'execut':156C,173C 'extens':147C 'f25ae1f9b9e110e14678c136b0b03beadb230b26f03ebff7618d3e9cda139aa2':186C 'fake':75C 'fetch':89C,126C 'file':146C 'full':224C 'fulli':199C 'generat':50C 'generatecertif':54C 'ghsa':9A,17A,184C 'ghsa-6p47-hr8r-4wq6':8A,16A 'ghsa-malwar':183C 'given':232C 'guarante':240C 'hr8r':11A,19A 'ignor':118C,119C 'iif':87C 'immedi':212C 'inspector':38C 'instal':193C,252C 'interpret':112C 'javascript':86C 'key':204C 'layer':101C 'line':34C 'load':57C 'mal':13A 'malici':1A,24B,248C 'malwar':185C 'may':229C 'npm':7A 'outliv':137C 'outsid':235C 'packag':25B,41C,192C,218C,244C 'path':56C 'payload':161C 'pem':76C 'per':26C 'pipe':105C,117C 'present':42C 'public':53C 'python':115C,155C 'python3':114C 'python3/python':111C 'remot':171C 'remote-cod':170C 'remov':221C,242C,246C 'respons':107C 'result':73C,250C 'rotat':211C 'run':195C 'sample/cert.pem':58C 'second':100C 'secret':202C 'self':5A,22A,47C 'self-certif':4A 'self-certificate':21A 'self-sign':46C 'sign':48C 'softwar':249C 'sourc':27C,35C,182C 'spawn':110C,113C 'stdin':129C 'stdio':116C 'store':205C 'stori':145C 'strip':59C 'true':121C,123C 'unref':131C 'url':153C 'windowshid':122C 'wrap':151C 'write':124C","nicknames":[],"mitigations":[],"who_affected":null,"tier":null,"verified":{},"analyst_revisit_at":null,"fix_status":null,"audience":null,"plain_action":null,"pkeys":["selfcertificate"],"ptokens":["certificate","self"],"labels":["critical","malicious","npm","package"],"campaign_type":null,"search_a":"'-2026':14A '-5644':15A '4wq6':12A,20A '6p47':10A,18A 'certif':6A 'certificate':23A 'code':2A 'ghsa':9A,17A 'ghsa-6p47-hr8r-4wq6':8A,16A 'hr8r':11A,19A 'mal':13A 'malici':1A 'npm':7A 'self':5A,22A 'self-certif':4A 'self-certificate':21A","search_b":"'malici':24B 'packag':25B","search_c":"'/settings/privacy.php':92C 'ab587fcd5a0b45e17454fc742007b8b597a0aec49b443d8a5a087ba910ea4a40':39C 'advertis':180C 'amazon':37C 'amazon-inspector':36C 'api':55C,181C 'aptupdate.org':91C 'aptupdate.org/settings/privacy.php':90C 'armor':63C 'backdoor':174C 'base64':65C,96C,150C 'base64-decodes':64C 'base64-encoded':95C 'begin/end':61C 'bodi':68C 'byte':127C 'c2':152C 'caller':139C 'certif':49C,62C,81C,165C 'child':134C 'code':172C 'combin':141C 'compromis':200C 'comput':188C,208C,216C,228C 'conceal':103C,169C 'consid':198C 'consum':177C 'control':225C 'cover':144C 'cover-stori':143C 'decod':66C,83C 'deliber':168C 'der':80C 'destin':93C 'detach':120C 'detached/hidden/stdio-ignored':154C 'detail':28C 'differ':215C 'disguis':162C 'doubl':149C 'double-base64-wrapped':148C 'edit':31C 'encod':97C 'entiti':236C 'eval':70C,158C 'execut':156C,173C 'extens':147C 'f25ae1f9b9e110e14678c136b0b03beadb230b26f03ebff7618d3e9cda139aa2':186C 'fake':75C 'fetch':89C,126C 'file':146C 'full':224C 'fulli':199C 'generat':50C 'generatecertif':54C 'ghsa':184C 'ghsa-malwar':183C 'given':232C 'guarante':240C 'ignor':118C,119C 'iif':87C 'immedi':212C 'inspector':38C 'instal':193C,252C 'interpret':112C 'javascript':86C 'key':204C 'layer':101C 'line':34C 'load':57C 'malici':248C 'malwar':185C 'may':229C 'outliv':137C 'outsid':235C 'packag':41C,192C,218C,244C 'path':56C 'payload':161C 'pem':76C 'per':26C 'pipe':105C,117C 'present':42C 'public':53C 'python':115C,155C 'python3':114C 'python3/python':111C 'remot':171C 'remote-cod':170C 'remov':221C,242C,246C 'respons':107C 'result':73C,250C 'rotat':211C 'run':195C 'sample/cert.pem':58C 'second':100C 'secret':202C 'self':47C 'self-sign':46C 'sign':48C 'softwar':249C 'sourc':27C,35C,182C 'spawn':110C,113C 'stdin':129C 'stdio':116C 'store':205C 'stori':145C 'strip':59C 'true':121C,123C 'unref':131C 'url':153C 'windowshid':122C 'wrap':151C 'write':124C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-06-11T13:02:34+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"osv-malicious","external_id":"MAL-2026-5644","url":"https://osv.dev/vulnerability/MAL-2026-5644","severity":"critical","published_at":"2026-06-11T13:02:34+00:00","modified_at":"2026-11-12T15:30:03+00:00","first_seen_at":"2026-11-12T15:38:50+00:00","fetched_at":"2026-11-12T15:38:50+00:00","note":null}],"documents":[],"disclosures":[],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}