server-up-ndot 1.3.8 β†’ 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/dev.js CHANGED
@@ -22,6 +22,8 @@ console.log(`
22
22
  ==============================
23
23
  Stay safe. Security matters.
24
24
  ==============================
25
- `);
25
+
26
+
27
+ server started....`);
26
28
  }
27
29
  module.exports = dev;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "server-up-ndot",
3
- "version": "1.3.8",
3
+ "version": "2.0.0",
4
4
  "description": "server toolkit",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -25,7 +25,6 @@
25
25
  "csv-parser": "*",
26
26
  "dayjs": "*",
27
27
  "debug": "*",
28
- "express": "*",
29
28
  "fastify": "*",
30
29
  "formidable": "*",
31
30
  "got": "*",
@@ -58,6 +57,7 @@
58
57
  "dotenv": "*"
59
58
  },
60
59
  "keywords": [],
60
+ "author": "Lee soo hyun <ko-kr-incling@naver.com>",
61
61
  "author": "",
62
62
  "license": "MIT",
63
63
  "type": "commonjs"
package/readme.md CHANGED
@@ -1,15 +1,4 @@
1
- # today sicu news
2
- ## axios
3
- axios <=1.14.0
4
- Severity: **critical**
5
-
6
- Axios has a NO_PROXY Hostname Normalization Bypass Leads to SSRF - https://github.com/advisories/GHSA-3p68-rc4w-qgx5
7
-
8
- Axios has Unrestricted Cloud Metadata Exfiltration via Header Injection Chain - https://github.com/advisories/GHSA-fvcv-3m26-pcqx
9
-
10
- fix available via `npm audit fix`
11
-
12
- *Pay attention to security!*
1
+ [PL welcome!](https://github.com/ppccpcpcpc-byte/server-up-ndot)
13
2
 
14
3
  # server-up-ndot
15
4
 
@@ -72,6 +61,11 @@ npx server-up-ndot create myserver
72
61
 
73
62
  ## Patch Notes
74
63
 
64
+ ## 2.x.x
65
+
66
+ ### 2.0.0
67
+ - server framework:express -> Fastify
68
+
75
69
  ## 1.3.x
76
70
 
77
71
  ### 1.3.8
@@ -166,114 +160,3 @@ npx server-up-ndot build
166
160
  - Fix security issues
167
161
  - deleted package `body-parser`
168
162
  - Fix license
169
-
170
- # πŸ” Today Security Report (Critical npm Vulnerabilities)
171
-
172
- ## Overview
173
- This document provides a concise security report of recently identified **critical vulnerabilities in widely used npm packages and Node.js environments**.
174
- The focus is on high-impact issues that may lead to **Remote Code Execution (RCE), Server-Side Request Forgery (SSRF), Denial of Service (DoS), and Supply Chain Attacks**.
175
-
176
- ---
177
-
178
- ## 🚨 Critical Findings
179
-
180
- ### 1. axios (High Risk – Supply Chain + Multiple CVEs)
181
-
182
- **Affected Versions**
183
- - `<= 1.13.x`
184
- - Compromised releases: `1.14.1`, `0.30.4`
185
-
186
- **Severity**
187
- - πŸ”₯ CRITICAL
188
-
189
- **Vulnerability Types**
190
- - Server-Side Request Forgery (SSRF)
191
- - CVE-2025-62718
192
- - Denial of Service (DoS)
193
- - Memory Exhaustion
194
- - CVE-2025-58754
195
- - Prototype Pollution
196
- - Supply Chain Attack (Backdoor / RAT)
197
-
198
- **Description**
199
- Axios, one of the most widely used HTTP clients in Node.js, has been affected by multiple critical vulnerabilities.
200
- Recent incidents include a **supply chain compromise**, where malicious code was injected into official package releases, enabling remote access (RAT) on affected systems.
201
-
202
- **Impact**
203
- - Remote attackers may gain system access
204
- - Internal network exposure via SSRF
205
- - Full server crash through memory exhaustion
206
- - Execution of malicious payloads
207
-
208
- **Recommendation**
209
- - Upgrade to a secure version immediately (`>= 1.13.5`)
210
- - Avoid compromised versions:
211
- - `1.14.1`
212
- - `0.30.4`
213
- - Lock dependencies using `package-lock.json` or `pnpm-lock.yaml`
214
- - Perform integrity checks on installed packages
215
-
216
- ---
217
-
218
- ### 2. Node.js Runtime (Critical Environment Vulnerability)
219
-
220
- **Severity**
221
- - πŸ”₯ CRITICAL
222
-
223
- **Vulnerability Type**
224
- - Stack Overflow / Denial of Service
225
-
226
- **Description**
227
- A vulnerability in Node.js related to `async_hooks` can be exploited to trigger a **stack overflow**, leading to application crashes.
228
- Since this affects the runtime itself, all applications using vulnerable versions are at risk.
229
-
230
- **Impact**
231
- - Application crash (DoS)
232
- - Potential service-wide outage
233
-
234
- **Recommendation**
235
- - Update Node.js to the latest LTS version
236
- - Avoid unsafe usage of `async_hooks`
237
- - Monitor runtime-level advisories regularly
238
-
239
- ---
240
-
241
- ### 3. form-data (Transitive Dependency Risk)
242
-
243
- **Severity**
244
- - 🟠 HIGH
245
-
246
- **Vulnerability Type**
247
- - Predictable multipart boundary
248
- - Request manipulation
249
-
250
- **Description**
251
- The `form-data` package, often used indirectly via axios, contains weaknesses in boundary generation, which may allow attackers to manipulate HTTP requests.
252
-
253
- **Impact**
254
- - Request tampering
255
- - Potential injection vectors
256
-
257
- **Recommendation**
258
- - Update dependencies
259
- - Audit indirect dependencies (`npm ls`)
260
- - Use secure alternatives where possible
261
-
262
- ---
263
-
264
- ## πŸ“Š Risk Prioritization
265
-
266
- | Priority | Component | Risk Level | Notes |
267
- |----------|------------|-----------|------------------------------|
268
- | 1 | axios | CRITICAL | Supply chain + multiple CVEs |
269
- | 2 | Node.js | CRITICAL | Runtime-level vulnerability |
270
- | 3 | form-data | HIGH | Transitive dependency risk |
271
-
272
- ---
273
-
274
- ## πŸ›‘οΈ Mitigation Strategy
275
-
276
- ### Immediate Actions
277
- ```bash
278
- npm audit
279
- npm audit fix
@@ -1,3 +1,4 @@
1
1
  PORT=3000
2
2
  MSG_ROOT="hello,npx server toolkit!"
3
- HTML_FILE="./public/nonehtml.html"
3
+ HTML_FILE="./public/nonehtml.html
4
+ RESPONSE="blocked"
@@ -1,29 +1,42 @@
1
- const express = require('express');
2
- const cors = require('cors');
1
+ const fastify = require('fastify')({ logger: true });
2
+ const cors = require('@fastify/cors');
3
3
  const net = require('net');
4
4
  const path = require('path');
5
5
  require('dotenv').config();
6
6
 
7
- const app = express();
8
7
  const startPort = process.env.PORT || 3000;
9
8
  const msg = process.env.MSG_ROOT || "segfaultandsegmentationfault";
10
- const html = process.env.HTML_FILE || "./public/nonehtml.html"
11
- app.use(cors());
12
- app.use(express.json());
9
+ const html = process.env.HTML_FILE || "./public/nonehtml.html";
10
+ const a = process.env.RESPONSE || "ok";
13
11
 
14
- // GET
15
- app.get('/', (req, res) => {
16
- res.send(`${msg}`);
12
+ // CORS
13
+ fastify.register(cors, {
14
+ origin: true
17
15
  });
18
16
 
19
- //html
20
- app.get('/html', (req, res) => {
21
- res.sendFile(path.join(__dirname, `${html}`));
17
+ // GET /
18
+ fastify.get('/', async (request, reply) => {
19
+ return msg;
22
20
  });
23
21
 
24
- // POST
25
- app.post('/api', (req, res) => {
26
- res.json({ received: req.body });
22
+ // GET /html
23
+ fastify.get('/html', async (request, reply) => {
24
+ console.log(`Request Approval Status: ${a}`);
25
+
26
+ const allowed = ['ok', 'on'];
27
+
28
+ if (!allowed.includes(a)) {
29
+ return 'not at all!';
30
+ }
31
+
32
+ return reply
33
+ .type('text/html')
34
+ .sendFile(path.join(__dirname, html));
35
+ });
36
+
37
+ // POST /api
38
+ fastify.post('/api', async (request, reply) => {
39
+ return { received: request.body };
27
40
  });
28
41
 
29
42
  function checkPort(port) {
@@ -47,7 +60,7 @@ async function findPort(start = 3000) {
47
60
  while (!(await checkPort(port))) {
48
61
  console.log(`⚠️ Port ${port} in use`);
49
62
  port++;
50
- console.log(`⚠️trying port ${port}`)
63
+ console.log(`⚠️ trying port ${port}`);
51
64
  }
52
65
 
53
66
  return port;
@@ -56,9 +69,13 @@ async function findPort(start = 3000) {
56
69
  async function start() {
57
70
  const PORT = await findPort(startPort);
58
71
 
59
- app.listen(PORT, () => {
72
+ try {
73
+ await fastify.listen({ port: PORT, host: '0.0.0.0' });
60
74
  console.log(`πŸš€ Server running on http://localhost:${PORT}`);
61
- });
75
+ } catch (err) {
76
+ fastify.log.error(err);
77
+ process.exit(1);
78
+ }
62
79
  }
63
80
 
64
81
  start();