{"id":25482,"date":"2022-10-12T19:46:54","date_gmt":"2022-10-12T19:46:54","guid":{"rendered":"https:\/\/www.esecurityplanet.com\/?p=25482"},"modified":"2022-10-12T22:48:14","modified_gmt":"2022-10-12T22:48:14","slug":"vulnerable-api-exposes-private-npm-packages","status":"publish","type":"post","link":"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/","title":{"rendered":"Vulnerable API Exposes Private npm Packages"},"content":{"rendered":"\n<p>Aqua Nautilus security researchers have revealed that threat actors could perform a timing attack on npm&#8217;s <a href=\"https:\/\/www.esecurityplanet.com\/applications\/how-to-control-api-security-risks\/\" target=\"_blank\" rel=\"noreferrer noopener\">API<\/a> to uncover private packages.<\/p>\n\n\n\n<p>The timing attack on the JavaScript package manager can work even if npm returns a 404 error to unauthorized or unauthenticated users who try to request the following endpoint (generic pattern):<\/p>\n\n\n\n<p>https:\/\/registry.npmjs.org\/@&lt;scope_name>\/&lt;secret_package_name><\/p>\n\n\n\n<p>A malicious attacker can send multiple consecutive requests to determine if the package exists or has been removed. Such a timing attack consists of comparing \u201cthe time it takes to search for a private package that exists with a private package that doesn\u2019t exist,&#8221; Aqua&#8217;s Yakir Kadkoda <a href=\"https:\/\/blog.aquasec.com\/private-packages-disclosed-via-timing-attack-on-npm\" target=\"_blank\" rel=\"noreferrer noopener\">wrote<\/a>.<\/p>\n\n\n\n<p>The researchers discovered it takes around five consecutive API requests to find that the API response takes significantly more time when the package exists or has been removed: 648ms vs. 101ms. Such a gap allows the discovery process to be automated by creating a list of potential package names to be tested.<\/p>\n\n\n\n<p>The issue was reported to GitHub\u2019s bug bounty program in March 2022, but the platform\u2019s answer is not reassuring: \u201cBecause of these architectural limitations, we cannot prevent timing attacks from determining whether a specific private package exists.\u201d<\/p>\n\n\n\n<p>See the <a href=\"https:\/\/www.esecurityplanet.com\/applications\/top-code-debugging-and-code-security-tools\/\" target=\"_blank\" rel=\"noreferrer noopener\">Top Code Debugging and Code Security Tools<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How Hackers Can Exploit the API Design Flaw<\/strong><\/h2>\n\n\n\n<p>Kadkoda\u2019s methodology is quite straightforward: he created a private npm package under a \u201crandom-organization\u201d and uploaded some files.<\/p>\n\n\n\n<p>Then he verified that the package existed with an authenticated and authorized user (member of the organization). He did the same with an unauthenticated user but did not find notable differences with a single consecutive request. It\u2019s only after five consecutive requests from \u201cvarious systems\u201d that the results became significant:<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/GRn3qdvvbdLPBj3-utVXs15TfOKyBCUgdGRNG_FNfPoHe1G5uWXND35C9XEeKcJ90iJhdM9doZHTtiseqPCIPMeY1ZqraTNWjFkpQEqUWQhW7QAS1Klafdv9r_r3MtIk1JL2cGGvHkerH06QSIUconNbaAesBlCo6Zl4tNI0R9mak9fei5hvvNIxHehsjeJswgiB8Q\" width=\"632\" height=\"276\"><\/p>\n\n\n\n<p>This information could be exploited to disclose private package names and perform various malicious techniques like typosquatting or dependency confusion to hack the <a href=\"https:\/\/www.esecurityplanet.com\/applications\/software-supply-chain-security-guidance-for-developers\/\" target=\"_blank\" rel=\"noreferrer noopener\">software supply chain<\/a>.<img loading=\"lazy\" decoding=\"async\" width=\"665\" height=\"174\" src=\"https:\/\/lh3.googleusercontent.com\/00jyyv2ycTw6BtJoIhEgPieovr_A_4SrvHotElA1nLe3uBVgk3mtHT12-WEKiu1OPtAQFCRPp8d1kGkg8WvYHEE4DZ4hL_r3B0q-iJAuebW7x7DPSvxTofBxtfmct3ZTykpkbuKnVIueWqwzHrsdG2wFbMdHQI0VdgT9c_y4PgjE1LIB0foCn1W8bC4wprjN8HdR2Q\"><\/p>\n\n\n\n<p>To achieve that, attackers could use generic or more customized dictionaries with names that contain the name of the organization. It\u2019s not uncommon for dev teams to apply some naming convention to keep things organized and clean.<\/p>\n\n\n\n<p>According to Aqua researchers, an attacker may also use public datasets to get a list of removed public packages that could have been converted to private packages.<\/p>\n\n\n\n<p>It\u2019s definitely not the first time npm (and other platforms) has been impacted by such threats, which put many organizations at risk (see <a href=\"https:\/\/www.esecurityplanet.com\/applications\/software-supply-chain-a-risky-time-for-dependencies\/\" target=\"_blank\" rel=\"noreferrer noopener\">Software Supply Chain: A Risky Time for Dependencies<\/a>).<\/p>\n\n\n\n<p>&#8220;Over the past few years, we\u2019ve seen a dramatic increase by hundreds of percentage points in supply chain attacks,&#8221; Kadkoda wrote. &#8220;In some cases, the threat actors\u2019 goal is to gain access to open-source packages\/projects and poison them. Other times they masquerade as private or public packages\/projects, deliberately misspelling their names in order to trick unsuspecting victims into downloading their malicious package instead of legitimate popular ones.&#8221;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How to Protect Against the npm Timing Attack<\/strong><\/h2>\n\n\n\n<p>Aqua Nautilus recommends recording all private and public packages, a good practice that can be summarized as \u201cknow your supply chain.\u201d<\/p>\n\n\n\n<p>The researchers said dev and security teams should also look for typosquatting, lookalikes, or masquerading packages.<\/p>\n\n\n\n<p>&#8220;Verify that there are no other packages with the same name as your internal private packages,&#8221; they said. &#8220;If you find any similar packages, make sure that they do not contain malware and notify the relevant stakeholders.<\/p>\n\n\n\n<p>&#8220;If you don\u2019t find public packages similar to your internal packages, consider creating <strong>public<\/strong> packages as <strong>placeholders<\/strong> to prevent such attacks.&#8221;<\/p>\n\n\n\n<p>Because big software platforms have huge constraints, fixing flawed API design and other security holes can take a long time or even be marked as \u201cwon\u2019t fix.\u201d It does not mean companies should quit all third-party services and handle everything by themselves internally, however.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The DIY approach is not always rewarding, as it shifts the responsibility to the end of the chain without guaranteeing better security<\/li><li>The total cost would rise significantly and could even make the infrastructure a maintenance and security nightmare<\/li><\/ul>\n\n\n\n<p>Another good approach is to avoid multiplying private packages, which is pretty tempting for dev teams but not always the best way, as many utilities can be grouped and refactored. The more private packages you create, the more it extends the attack surface, by definition.<\/p>\n\n\n\n<p>Many teams start with internal tools that could potentially become great public open-source packages, but there\u2019s no need to keep everything at the same place. Nobody needs the complete history. Just create a public repository with the same name, and leave it blank until it\u2019s time to share it publicly.<\/p>\n\n\n\n<p>You\u2019ll avoid unwanted disclosures via the Git commits too.<\/p>\n\n\n\n<p>Last but not least, have documented procedures to install and use dev environments and prevent developers from installing (and committing) packages. Adding, updating, or removing packages requires team reviews.<\/p>\n\n\n\n<p>Read next: <a href=\"https:\/\/www.esecurityplanet.com\/applications\/open-source-supply-chain-security-project\/\">New Open-source Security Initiative Aimed at Supply Chain Attacks<\/a><\/p>\n\n\n<div id=\"ta-campaign-widget-66d6f2e5d3cc0-popup-wrapper\" class=\"ta-campaign-widget__popup-wrapper\">\n    \n<div\n    style=\"\n        --ta-campaign-plugin-primary: #3545ed;\n        --ta-campaign-plugin-button-text: #fff;\n        --ta-campaign-plugin-button-hover-background: #3231b4;\n        --ta-campaign-plugin-button-hover-text: #fff;\n        --ta-campaign-plugin-button-toggle-background: #3231b4;\n        --ta-campaign-plugin-button-toggle-text: #3231B4;\n    \"\n    data-ajax-url=\"https:\/\/www.esecurityplanet.com\/wp\/wp-admin\/admin-ajax.php\">\n    <div\n        id=\"ta-campaign-widget-66d6f2e5d3cc0\"\n        class=\"ta-campaign-widget ta-campaign-widget--popup\"\n        data-campaign-fields='{\"properties\":{\"campaign_type\":\"popup\",\"campaign_category\":false,\"sailthru_list\":[\"cybersecurity-insider\"],\"popup_type\":\"exit_intent\",\"appearance\":{\"colors\":{\"primary_color\":\"#3545ed\",\"button\":{\"button_text_color\":\"#fff\",\"hover\":{\"button_hover_background_color\":\"#3231b4\",\"button_hover_text_color\":\"#fff\"},\"toggle\":{\"button_toggle_background_color\":\"#3231b4\",\"button_toggle_text_color\":\"#3231B4\"}}},\"custom_scss\":\"\"},\"behavior\":{\"opt_in_enabled\":true},\"language\":{\"tagline\":\"Get the Free Cybersecurity Newsletter\",\"subtagline\":\"\",\"content\":\"Strengthen your organization&#39;s IT security defenses by keeping up to date on the latest cybersecurity news, solutions, and best practices. Delivered every Monday, Tuesday and Thursday\",\"email_placeholder\":\"Work Email Address\",\"opt_in\":\"By signing up to receive our newsletter, you agree to our Terms of Use and Privacy Policy. You can unsubscribe at any time.\",\"subscribe_button\":\"Subscribe\"}},\"identifier\":\"66d6f2e5d3cc0\",\"campaign_id\":26045,\"campaign_type\":\"popup\",\"popup_type\":\"exit_intent\",\"newsletters\":[\"cybersecurity-insider\"],\"behavior\":{\"opt_in_enabled\":true},\"appearance\":{\"colors\":{\"primary\":\"#3545ed\",\"button\":{\"text\":\"#fff\",\"hover\":{\"background\":\"#3231b4\",\"text\":\"#fff\"},\"toggle\":{\"background\":\"#3231b4\",\"text\":\"#3231B4\"}}},\"custom_css\":\"\"},\"language\":{\"tagline\":\"Get the Free Cybersecurity Newsletter\",\"subtagline\":\"\",\"content\":\"Strengthen your organization&#39;s IT security defenses by keeping up to date on the latest cybersecurity news, solutions, and best practices. Delivered every Monday, Tuesday and Thursday\",\"email_placeholder\":\"Work Email Address\",\"opt_in\":\"By signing up to receive our newsletter, you agree to our Terms of Use and Privacy Policy. You can unsubscribe at any time.\",\"subscribe_button\":\"Subscribe\"}}'>\n\n                <div class=\"ta-campaign-widget__exit\">\n            <svg class=\"w-8\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" aria-hidden=\"true\">\n                <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\"><\/path>\n            <\/svg>\n        <\/div>\n        \n        <div class=\"ta-campaign-widget__wrapper\">\n            <div class=\"ta-campaign-widget__header mb-6\">\n                                <h3 class=\"ta-campaign-widget__tagline\">\n                    Get the Free Cybersecurity Newsletter                <\/h3>\n                \n                \n                                <p class=\"ta-campaign-widget__content mt-6\">\n                    Strengthen your organization's IT security defenses by keeping up to date on the latest cybersecurity news, solutions, and best practices. Delivered every Monday, Tuesday and Thursday                <\/p>\n                            <\/div>\n\n            <form class=\"ta-campaign-widget__form\">\n                <div class=\"ta-campaign-widget__input mb-4\"  data-field=\"email\">\n                    <label\n                        class=\"sr-only\"\n                        for=\"email-66d6f2e5d3cc0\">\n                        Email Address\n                    <\/label>\n                    <input\n                        class=\"ta-campaign-widget__input__text\"\n                        placeholder=\"Work Email Address\"\n                        id=\"email-66d6f2e5d3cc0\"\n                        name=\"email\"\n                        type=\"email\">\n                <\/div>\n\n                                <div class=\"ta-campaign-widget__checkbox mb-4\" data-field=\"opt_in\">\n                    <div class=\"flex items-start\">\n                        <input\n                            id=\"opt-in-66d6f2e5d3cc0\"\n                            class=\"ta-campaign-widget__checkbox__input mr-2\"\n                            name=\"opt-in\"\n                            type=\"checkbox\"\/>\n                        <label\n                            class=\"ta-campaign-widget__checkbox__label\"\n                            for=\"opt-in-66d6f2e5d3cc0\">\n                            By signing up to receive our newsletter, you agree to our Terms of Use and Privacy Policy. You can unsubscribe at any time.                        <\/label>\n                    <\/div>\n                <\/div>\n                \n                <button class=\"ta-campaign-widget__button\" type=\"submit\" >\n                    Subscribe                <\/button>\n            <\/form>\n        <\/div>\n    <\/div>\n<\/div>\n\n<style>\n<\/style><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Aqua Nautilus security researchers have revealed that threat actors could perform a timing attack on npm&#8217;s API to uncover private packages. The timing attack on the JavaScript package manager can work even if npm returns a 404 error to unauthorized or unauthenticated users who try to request the following endpoint (generic pattern): https:\/\/registry.npmjs.org\/@&lt;scope_name>\/&lt;secret_package_name> A malicious [&hellip;]<\/p>\n","protected":false},"author":267,"featured_media":25484,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_gazelle_contributing_experts":"","footnotes":""},"categories":[15],"tags":[5735,2369,3790,30797,3414,730,5277],"b2b_audience":[33,35],"b2b_industry":[],"b2b_product":[382,31780,31775],"class_list":["post-25482","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-threats","tag-application-security-2","tag-cloud-security","tag-cybersecurity","tag-devsecops","tag-network-security","tag-security","tag-web-security","b2b_audience-awareness-and-consideration","b2b_audience-implementation-and-support","b2b_product-application-security-vulnerability-management","b2b_product-patch-management","b2b_product-web-applications-security"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Vulnerable API Exposes Private npm Packages | eSecurity Planet<\/title>\n<meta name=\"description\" content=\"An API timing attack could expose private npm packages - and here&#039;s how dev teams can address the vulnerability.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Vulnerable API Exposes Private npm Packages | eSecurity Planet\" \/>\n<meta property=\"og:description\" content=\"An API timing attack could expose private npm packages - and here&#039;s how dev teams can address the vulnerability.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/\" \/>\n<meta property=\"og:site_name\" content=\"eSecurity Planet\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-12T19:46:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-10-12T22:48:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.esecurityplanet.com\/uploads\/2022\/10\/results.png\" \/>\n\t<meta property=\"og:image:width\" content=\"677\" \/>\n\t<meta property=\"og:image:height\" content=\"295\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Julien Maury\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@eSecurityPlanet\" \/>\n<meta name=\"twitter:site\" content=\"@eSecurityPlanet\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Julien Maury\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/\"},\"author\":{\"name\":\"Julien Maury\",\"@id\":\"https:\/\/www.esecurityplanet.com\/#\/schema\/person\/4723f5dca54d7ee1d8111912ac8b1d4a\"},\"headline\":\"Vulnerable API Exposes Private npm Packages\",\"datePublished\":\"2022-10-12T19:46:54+00:00\",\"dateModified\":\"2022-10-12T22:48:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/\"},\"wordCount\":824,\"publisher\":{\"@id\":\"https:\/\/www.esecurityplanet.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/assets.esecurityplanet.com\/uploads\/2022\/10\/results.png\",\"keywords\":[\"application security\",\"cloud security\",\"cybersecurity\",\"DevSecOps\",\"network security\",\"security\",\"Web security\"],\"articleSection\":[\"Threats\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/\",\"url\":\"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/\",\"name\":\"Vulnerable API Exposes Private npm Packages | eSecurity Planet\",\"isPartOf\":{\"@id\":\"https:\/\/www.esecurityplanet.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/assets.esecurityplanet.com\/uploads\/2022\/10\/results.png\",\"datePublished\":\"2022-10-12T19:46:54+00:00\",\"dateModified\":\"2022-10-12T22:48:14+00:00\",\"description\":\"An API timing attack could expose private npm packages - and here's how dev teams can address the vulnerability.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/#primaryimage\",\"url\":\"https:\/\/assets.esecurityplanet.com\/uploads\/2022\/10\/results.png\",\"contentUrl\":\"https:\/\/assets.esecurityplanet.com\/uploads\/2022\/10\/results.png\",\"width\":677,\"height\":295,\"caption\":\"npm api timing attack\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esecurityplanet.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Vulnerable API Exposes Private npm Packages\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esecurityplanet.com\/#website\",\"url\":\"https:\/\/www.esecurityplanet.com\/\",\"name\":\"eSecurity Planet\",\"description\":\"Industry-leading guidance and analysis for how to keep your business secure.\",\"publisher\":{\"@id\":\"https:\/\/www.esecurityplanet.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.esecurityplanet.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.esecurityplanet.com\/#organization\",\"name\":\"eSecurityPlanet\",\"url\":\"https:\/\/www.esecurityplanet.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esecurityplanet.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/assets.esecurityplanet.com\/uploads\/2020\/10\/eSecurity_logo_MainLogo.png\",\"contentUrl\":\"https:\/\/assets.esecurityplanet.com\/uploads\/2020\/10\/eSecurity_logo_MainLogo.png\",\"width\":1134,\"height\":375,\"caption\":\"eSecurityPlanet\"},\"image\":{\"@id\":\"https:\/\/www.esecurityplanet.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/eSecurityPlanet\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esecurityplanet.com\/#\/schema\/person\/4723f5dca54d7ee1d8111912ac8b1d4a\",\"name\":\"Julien Maury\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esecurityplanet.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/assets.esecurityplanet.com\/uploads\/2023\/02\/JulienMaury-AvatarImg-150x150.webp\",\"contentUrl\":\"https:\/\/assets.esecurityplanet.com\/uploads\/2023\/02\/JulienMaury-AvatarImg-150x150.webp\",\"caption\":\"Julien Maury\"},\"description\":\"eSecurity Planet contributor Julien Maury writes about penetration testing, code security, open source security and more. He is a backend developer, a mentor and a technical writer who enjoys sharing his knowledge and learning new concepts.\",\"url\":\"https:\/\/www.esecurityplanet.com\/author\/jmaury\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Vulnerable API Exposes Private npm Packages | eSecurity Planet","description":"An API timing attack could expose private npm packages - and here's how dev teams can address the vulnerability.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/","og_locale":"en_US","og_type":"article","og_title":"Vulnerable API Exposes Private npm Packages | eSecurity Planet","og_description":"An API timing attack could expose private npm packages - and here's how dev teams can address the vulnerability.","og_url":"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/","og_site_name":"eSecurity Planet","article_published_time":"2022-10-12T19:46:54+00:00","article_modified_time":"2022-10-12T22:48:14+00:00","og_image":[{"width":677,"height":295,"url":"https:\/\/assets.esecurityplanet.com\/uploads\/2022\/10\/results.png","type":"image\/png"}],"author":"Julien Maury","twitter_card":"summary_large_image","twitter_creator":"@eSecurityPlanet","twitter_site":"@eSecurityPlanet","twitter_misc":{"Written by":"Julien Maury","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/#article","isPartOf":{"@id":"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/"},"author":{"name":"Julien Maury","@id":"https:\/\/www.esecurityplanet.com\/#\/schema\/person\/4723f5dca54d7ee1d8111912ac8b1d4a"},"headline":"Vulnerable API Exposes Private npm Packages","datePublished":"2022-10-12T19:46:54+00:00","dateModified":"2022-10-12T22:48:14+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/"},"wordCount":824,"publisher":{"@id":"https:\/\/www.esecurityplanet.com\/#organization"},"image":{"@id":"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.esecurityplanet.com\/uploads\/2022\/10\/results.png","keywords":["application security","cloud security","cybersecurity","DevSecOps","network security","security","Web security"],"articleSection":["Threats"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/","url":"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/","name":"Vulnerable API Exposes Private npm Packages | eSecurity Planet","isPartOf":{"@id":"https:\/\/www.esecurityplanet.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/#primaryimage"},"image":{"@id":"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.esecurityplanet.com\/uploads\/2022\/10\/results.png","datePublished":"2022-10-12T19:46:54+00:00","dateModified":"2022-10-12T22:48:14+00:00","description":"An API timing attack could expose private npm packages - and here's how dev teams can address the vulnerability.","breadcrumb":{"@id":"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/#primaryimage","url":"https:\/\/assets.esecurityplanet.com\/uploads\/2022\/10\/results.png","contentUrl":"https:\/\/assets.esecurityplanet.com\/uploads\/2022\/10\/results.png","width":677,"height":295,"caption":"npm api timing attack"},{"@type":"BreadcrumbList","@id":"https:\/\/www.esecurityplanet.com\/threats\/vulnerable-api-exposes-private-npm-packages\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esecurityplanet.com\/"},{"@type":"ListItem","position":2,"name":"Vulnerable API Exposes Private npm Packages"}]},{"@type":"WebSite","@id":"https:\/\/www.esecurityplanet.com\/#website","url":"https:\/\/www.esecurityplanet.com\/","name":"eSecurity Planet","description":"Industry-leading guidance and analysis for how to keep your business secure.","publisher":{"@id":"https:\/\/www.esecurityplanet.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.esecurityplanet.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.esecurityplanet.com\/#organization","name":"eSecurityPlanet","url":"https:\/\/www.esecurityplanet.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esecurityplanet.com\/#\/schema\/logo\/image\/","url":"https:\/\/assets.esecurityplanet.com\/uploads\/2020\/10\/eSecurity_logo_MainLogo.png","contentUrl":"https:\/\/assets.esecurityplanet.com\/uploads\/2020\/10\/eSecurity_logo_MainLogo.png","width":1134,"height":375,"caption":"eSecurityPlanet"},"image":{"@id":"https:\/\/www.esecurityplanet.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/eSecurityPlanet"]},{"@type":"Person","@id":"https:\/\/www.esecurityplanet.com\/#\/schema\/person\/4723f5dca54d7ee1d8111912ac8b1d4a","name":"Julien Maury","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esecurityplanet.com\/#\/schema\/person\/image\/","url":"https:\/\/assets.esecurityplanet.com\/uploads\/2023\/02\/JulienMaury-AvatarImg-150x150.webp","contentUrl":"https:\/\/assets.esecurityplanet.com\/uploads\/2023\/02\/JulienMaury-AvatarImg-150x150.webp","caption":"Julien Maury"},"description":"eSecurity Planet contributor Julien Maury writes about penetration testing, code security, open source security and more. He is a backend developer, a mentor and a technical writer who enjoys sharing his knowledge and learning new concepts.","url":"https:\/\/www.esecurityplanet.com\/author\/jmaury\/"}]}},"_links":{"self":[{"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/posts\/25482"}],"collection":[{"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/users\/267"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/comments?post=25482"}],"version-history":[{"count":0,"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/posts\/25482\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/media\/25484"}],"wp:attachment":[{"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/media?parent=25482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/categories?post=25482"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/tags?post=25482"},{"taxonomy":"b2b_audience","embeddable":true,"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/b2b_audience?post=25482"},{"taxonomy":"b2b_industry","embeddable":true,"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/b2b_industry?post=25482"},{"taxonomy":"b2b_product","embeddable":true,"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/b2b_product?post=25482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}