server-up-ndot 1.3.7 β†’ 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.7",
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,14 +61,19 @@ 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
 
71
+ ### 1.3.8
72
+ - add a cve code(e,g:cve-xxxx-xxxxx)
73
+
77
74
  ### 1.3.7
78
75
  - There was a problem with the environment :( rollbacked.
79
76
 
80
- ### 1.3.6
81
- ~ use a CI ~
82
-
83
77
  ### 1.3.5
84
78
  - sicu report updated
85
79
 
@@ -166,112 +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
- - Denial of Service (DoS)
192
- - Prototype Pollution
193
- - Memory Exhaustion
194
- - Supply Chain Attack (Backdoor / RAT)
195
-
196
- **Description**
197
- Axios, one of the most widely used HTTP clients in Node.js, has been affected by multiple critical vulnerabilities.
198
- Recent incidents include a **supply chain compromise**, where malicious code was injected into official package releases, enabling remote access (RAT) on affected systems.
199
-
200
- **Impact**
201
- - Remote attackers may gain system access
202
- - Internal network exposure via SSRF
203
- - Full server crash through memory exhaustion
204
- - Execution of malicious payloads
205
-
206
- **Recommendation**
207
- - Upgrade to a secure version immediately (`>= 1.13.5`)
208
- - Avoid compromised versions:
209
- - `1.14.1`
210
- - `0.30.4`
211
- - Lock dependencies using `package-lock.json` or `pnpm-lock.yaml`
212
- - Perform integrity checks on installed packages
213
-
214
- ---
215
-
216
- ### 2. Node.js Runtime (Critical Environment Vulnerability)
217
-
218
- **Severity**
219
- - πŸ”₯ CRITICAL
220
-
221
- **Vulnerability Type**
222
- - Stack Overflow / Denial of Service
223
-
224
- **Description**
225
- A vulnerability in Node.js related to `async_hooks` can be exploited to trigger a **stack overflow**, leading to application crashes.
226
- Since this affects the runtime itself, all applications using vulnerable versions are at risk.
227
-
228
- **Impact**
229
- - Application crash (DoS)
230
- - Potential service-wide outage
231
-
232
- **Recommendation**
233
- - Update Node.js to the latest LTS version
234
- - Avoid unsafe usage of `async_hooks`
235
- - Monitor runtime-level advisories regularly
236
-
237
- ---
238
-
239
- ### 3. form-data (Transitive Dependency Risk)
240
-
241
- **Severity**
242
- - 🟠 HIGH
243
-
244
- **Vulnerability Type**
245
- - Predictable multipart boundary
246
- - Request manipulation
247
-
248
- **Description**
249
- The `form-data` package, often used indirectly via axios, contains weaknesses in boundary generation, which may allow attackers to manipulate HTTP requests.
250
-
251
- **Impact**
252
- - Request tampering
253
- - Potential injection vectors
254
-
255
- **Recommendation**
256
- - Update dependencies
257
- - Audit indirect dependencies (`npm ls`)
258
- - Use secure alternatives where possible
259
-
260
- ---
261
-
262
- ## πŸ“Š Risk Prioritization
263
-
264
- | Priority | Component | Risk Level | Notes |
265
- |----------|------------|-----------|------------------------------|
266
- | 1 | axios | CRITICAL | Supply chain + multiple CVEs |
267
- | 2 | Node.js | CRITICAL | Runtime-level vulnerability |
268
- | 3 | form-data | HIGH | Transitive dependency risk |
269
-
270
- ---
271
-
272
- ## πŸ›‘οΈ Mitigation Strategy
273
-
274
- ### Immediate Actions
275
- ```bash
276
- npm audit
277
- 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();