# Demo Importer Plus <=2.0.9 作者权限 XML实体注入漏洞
## 概述
WordPress 插件 Demo Importer Plus 在所有版本至 2.0.9 中存在 XML 外部实体注入(XXE)漏洞。
## 影响版本
2.0.9 及以下版本。
## 细节
该漏洞存在于 SVG 文件上传功能中,攻击者可利用 XXE 注入,结合特定条件触发代码执行。此问题仅影响运行 PHP 8.0 以下版本的站点。
## 影响
经认证的攻击者(具备作者或更高级别权限)可在符合条件的配置中实现远程代码执行。
是否为 Web 类漏洞: 未知
判断理由:
| # | POC 描述 | 源链接 | 神龙链接 |
|---|
标题: ERROR: The request could not be satisfied -- 🔗来源链接
标签:
神龙速读:
```
### 关键信息
- **错误代码**
- 403 ERROR
- **错误描述**
- The request could not be satisfied.
- **原因分析**
- Request blocked. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error.
- 可能是由于以下原因造成的:
- 服务器流量过大
- 配置错误
- **建议措施**
- 尝试稍后重试
- 联系应用程序或网站的所有者
- 如果使用CloudFront提供内容,请查阅CloudFront文档以进行故障排除并防止此类错误
- **生成来源**
- Generated by cloudfront (CloudFront)
- **请求ID**
- DBNdFK0LoyGGMvc71JzuNgwUKt07Hsni6NSfCxIZCnnoKrcKBUs_g==
```
标题: Changeset 3439643 for demo-importer-plus/trunk/inc/importers/class-demo-importer-plus-sites-helper.php – WordPress Plugin Repository -- 🔗来源链接
标签:
神龙速读:
### 关键漏洞信息
**文件**:
- `demo-importer-plus/trunk/inc/importers/class-demo-importer-plus-sites-helper.php`
**修复**:
- **漏洞**: 可能存在的XML外部实体(XXE)攻击风险。
- **修复措施**:
- 使用DOMDocument并禁用外部实体加载,以防止XXE攻击。
- 设置`$dom->resolveExternals = false;`和`$dom->substituteEntities = false;`来禁用外部实体加载和实体替换。
- 使用安全选项加载SVG文件,如`LIBXML_NONET | LIBXML_DTDLOAD | LIBXML_DTDATTR`。
**代码改动**:
- **移除**:
```php
$svg = simplexml_load_file( $svg );
$attributes = $svg->attributes();
$width = (string) $attributes->width;
$height = (string) $attributes->height;
```
- **添加**:
```php
$dom = new DOMDocument();
$dom->resolveExternals = false;
$dom->substituteEntities = false;
$loaded = $dom->load($svg, LIBXML_NONET | LIBXML_DTDLOAD | LIBXML_DTDATTR);
$svg_element = $dom->documentElement;
$width = $svg_element->getAttribute('width') ?: '0';
$height = $svg_element->getAttribute('height') ?: '0';
```
暂无评论