Skip to content

Commit 07929f2

Browse files
committed
Addresses security concern
1 parent 9524a09 commit 07929f2

File tree

6 files changed

+4948
-0
lines changed

6 files changed

+4948
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ test.html
3939
ad.js
4040
/.cache/
4141
CLAUDE.md
42+
github-issue-response.md

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,32 @@ AdminLTE v4 build scripts work cross-platform:
8888

8989
All npm scripts use cross-platform utilities to ensure consistent behavior across different operating systems.
9090

91+
## Security & Production Deployment
92+
93+
### Important Security Notice
94+
95+
AdminLTE is a **UI template** - when deploying to production, follow these critical guidelines:
96+
97+
**What to Deploy:**
98+
- Only compiled production assets: `dist/js/adminlte.min.js` and `dist/css/adminlte.min.css`
99+
- Your application-specific files
100+
101+
**What NOT to Deploy:**
102+
- `node_modules/` directory
103+
- Demo/example HTML files (index.html, index2.html, index3.html, etc.)
104+
- Source files (`src/` directory)
105+
- Development configuration files
106+
107+
**CVE-2021-36471 Notice:**
108+
This CVE is **disputed** and does not represent a vulnerability in AdminLTE. It refers to demo pages being accessible when developers incorrectly deploy example files to production. AdminLTE v4 has a clear separation between development demos and production assets. See [SECURITY.md](SECURITY.md) for complete details.
109+
110+
**Production Build:**
111+
```bash
112+
npm run production # Builds optimized assets in dist/
113+
```
114+
115+
For detailed security guidelines, authentication requirements, and best practices, see [SECURITY.md](SECURITY.md).
116+
91117
## Sponsorship
92118

93119
Support AdminLTE development by becoming a sponsor or donor.

SECURITY.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Security Policy
2+
3+
## Reporting Security Issues
4+
5+
If you discover a security vulnerability in AdminLTE, please report it by emailing the maintainers or opening a private security advisory on GitHub. We take security seriously and will respond promptly.
6+
7+
## Supported Versions
8+
9+
| Version | Supported |
10+
| ------- | ------------------ |
11+
| 4.x | :white_check_mark: |
12+
| 3.x | :x: |
13+
| < 3.0 | :x: |
14+
15+
## Security Best Practices
16+
17+
AdminLTE is a frontend admin dashboard template. When deploying applications built with AdminLTE, follow these security best practices:
18+
19+
### 1. Production Deployment
20+
21+
- **Never expose `node_modules` directory** in production environments
22+
- **Remove demo/example files** (like `index2.html`, `index3.html`) from production builds
23+
- **Use a proper build process** that only includes necessary production assets
24+
- **Configure web server properly** to prevent directory traversal attacks
25+
26+
### 2. Build Process
27+
28+
When deploying to production:
29+
30+
```bash
31+
# Build only production assets
32+
npm run production
33+
34+
# Deploy only the dist/ directory contents you need
35+
# Typically: dist/js/adminlte.min.js and dist/css/adminlte.min.css
36+
```
37+
38+
### 3. What NOT to Deploy
39+
40+
Do not deploy these to production:
41+
- `node_modules/` directory
42+
- Example/demo HTML files (`index.html`, `index2.html`, `index3.html`, etc.)
43+
- Source files (`src/` directory)
44+
- Development configuration files
45+
- Documentation files
46+
47+
## Known CVE Issues
48+
49+
### CVE-2021-36471 (Disputed)
50+
51+
**Status**: This CVE is **disputed** and does not represent a vulnerability in AdminLTE itself.
52+
53+
**Issue**: CVE-2021-36471 claims AdminLTE 3.1.0 has a "Directory Traversal vulnerability" that allows remote attackers to view demo pages via `/admin/index2.html` and `/admin/index3.html`.
54+
55+
**Clarification**:
56+
- The `index2.html` and `index3.html` files are **example/demo pages** intended for developer reference during development
57+
- This is **not a vulnerability in AdminLTE** - it is a **deployment misconfiguration** by website developers
58+
- The issue occurs when developers incorrectly deploy:
59+
- Their entire `node_modules` folder publicly
60+
- Demo/example files in production environments
61+
- Without proper web server configuration
62+
63+
**Resolution**:
64+
- AdminLTE 4.x has restructured the project architecture with clear separation between development demos and production assets
65+
- Follow the production deployment best practices above
66+
- Only deploy the compiled production assets from `dist/js/` and `dist/css/`
67+
- The original CVE researcher acknowledged this should be classified as low/info severity, not critical
68+
69+
**For More Information**:
70+
- [GitHub Issue #4948](https://github.com/ColorlibHQ/AdminLTE/issues/4948)
71+
- [CVE Record](https://www.cve.org/CVERecord?id=CVE-2021-36471) (marked as disputed)
72+
73+
## Secure Development
74+
75+
### Content Security Policy (CSP)
76+
77+
When implementing AdminLTE in your application, consider adding appropriate Content Security Policy headers to prevent XSS attacks.
78+
79+
### Authentication & Authorization
80+
81+
AdminLTE is a **UI template only** and does not include authentication or authorization. You must:
82+
- Implement proper authentication in your backend
83+
- Secure all API endpoints
84+
- Use HTTPS in production
85+
- Implement proper session management
86+
- Follow OWASP security guidelines
87+
88+
### Dependencies
89+
90+
- Keep AdminLTE and its dependencies up to date
91+
- Regularly run `npm audit` to check for vulnerabilities
92+
- Review security advisories for Bootstrap and other dependencies
93+
94+
## Contact
95+
96+
For security concerns, please contact the maintainers through:
97+
- GitHub Issues (for general questions)
98+
- GitHub Security Advisories (for sensitive security issues)
99+
- Project maintainer email (check package.json)

0 commit comments

Comments
 (0)