支持本站 — 捐款将帮助我们持续运营

目标:1000 元,已筹:752

75.2%
一、 漏洞 CVE-2025-55303 基础信息
漏洞信息
                                        # Astro _image 端点未授权第三方图片访问

## 概述

Astro 是一个面向内容驱动网站的 Web 框架。在受影响版本中,使用按需渲染部署的项目存在图像优化端点的安全漏洞,允许从未经授权的第三方域名加载图像。

## 影响版本

- 受影响版本:  
  - Astro < 5.13.2  
  - Astro 4.x < 4.16.18  

## 细节

Astro 的 `/_image` 端点用于提供优化后的图像版本。  
攻击者可通过使用协议相对 URL(如 `/_image?href=//example.com/image.png`)绕过第三方域名的限制。

## 影响

未经授权的第三方图像可能被加载并缓存,导致潜在的资源滥用或敏感信息泄露。
                                        
神龙判断

是否为 Web 类漏洞:

判断理由:

是。这个漏洞存在于Astro框架的服务器端,具体是在图像优化端点上。该漏洞允许攻击者通过使用协议相对的URL来绕过对第三方域名的限制,从而获取未经授权的第三方域名上的图像。这显然是一个服务端的漏洞,因为问题的核心在于服务端如何验证和处理请求的逻辑。
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
Unauthorized third-party images in Astro’s _image endpoint
来源:美国国家漏洞数据库 NVD
漏洞描述信息
Astro is a web framework for content-driven websites. In versions of astro before 5.13.2 and 4.16.18, the image optimization endpoint in projects deployed with on-demand rendering allows images from unauthorized third-party domains to be served. On-demand rendered sites built with Astro include an /_image endpoint which returns optimized versions of images. A bug in impacted versions of astro allows an attacker to bypass the third-party domain restrictions by using a protocol-relative URL as the image source, e.g. /_image?href=//example.com/image.png. This vulnerability is fixed in 5.13.2 and 4.16.18.
来源:美国国家漏洞数据库 NVD
CVSS信息
N/A
来源:美国国家漏洞数据库 NVD
漏洞类别
在Web页面生成时对输入的转义处理不恰当(跨站脚本)
来源:美国国家漏洞数据库 NVD
漏洞标题
Astro 安全漏洞
来源:中国国家信息安全漏洞库 CNNVD
漏洞描述信息
Astro是Astro开源的一个内容驱动网站的 web 框架。 Astro 5.13.2之前版本和4.16.18之前版本存在安全漏洞,该漏洞源于图像优化端点可能绕过第三方域名限制。
来源:中国国家信息安全漏洞库 CNNVD
CVSS信息
N/A
来源:中国国家信息安全漏洞库 CNNVD
漏洞类别
其他
来源:中国国家信息安全漏洞库 CNNVD
二、漏洞 CVE-2025-55303 的公开POC
#POC 描述源链接神龙链接
1Astro < 5.13.2 and < 4.16.18 contains an information disclosure vulnerability caused by improper validation of protocol-relative URLs in the image optimization endpoint, letting attackers serve images from unauthorized third-party domains, exploit requires on-demand rendering deployment. https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2025/CVE-2025-55303.yamlPOC详情
三、漏洞 CVE-2025-55303 的情报信息
  • 标题: Unauthorized third-party images in Astro’s _image endpoint · Advisory · withastro/astro · GitHub -- 🔗来源链接

    标签:x_refsource_CONFIRM

    神龙速读:
                                            ### 关键信息
    
    #### 漏洞概述
    - **漏洞名称**: Unauthorized third-party images in Astro’s _image endpoint
    - **严重性**: High
    - **CVE ID**: CVE-2025-55303
    - **受影响版本**:
      - `@astrojs/node`: <= 9.1.0
      - `astro`: <= 5.13.0, <= 4.16.18
    - **修复版本**:
      - `@astrojs/node`: >= 9.1.1
      - `astro`: >= 5.13.2, >= 4.16.19
    
    #### 漏洞描述
    - **摘要**: 在受影响版本的 Astro 中,使用按需渲染部署的项目中的图像优化端点允许未经授权的第三方域提供图像。
    - **详细信息**: 
      - 按需渲染的 Astro 站点包含一个 `_image` 端点,用于返回优化后的图像。
      - `_image` 端点限制处理与站点捆绑的本地图像,并支持来自站点开发人员手动授权的域的远程图像。
      - 受影响版本中的一个错误允许攻击者通过使用协议相对 URL 作为图像源来绕过第三方域限制。
    
    #### 影响
    - 允许未经授权的第三方在受影响站点的起源上创建 URL,提供未经授权的图像内容。
    - 对于 SVG 图像,这可能包括跨站脚本 (XSS) 的风险,如果用户点击了恶意制作的 SVG 链接。
    
    #### 证明概念
    1. 创建一个新的最小 Astro 项目 (`astro@5.13.0`)。
    2. 配置使用 Node 适配器 (`@astrojs/node@0.1.0`)。
    3. 运行 `astro build` 构建站点。
    4. 使用 `astro preview` 运行服务器。
    5. 将 `/image?href=//placeholder.co/600x400` 附加到预览 URL。
    6. 站点将从未经授权的 `placeholder.co` 域提供图像。
                                            
    Unauthorized third-party images in Astro’s _image endpoint · Advisory · withastro/astro · GitHub
  • 标题: Merge commit from fork · withastro/astro@4d16de7 · GitHub -- 🔗来源链接

    标签:x_refsource_MISC

    神龙速读:
                                            从这个网页截图中,可以获取到以下关于漏洞的关键信息:
    
    - **提交ID**: 4d16de7
    - **提交者**: @eramicus
    - **提交时间**: 2023年5月2日
    - **提交描述**: "Add tests for relative paths"
    - **更改文件**:
      - `packages/core/src/utils/paths.ts`
      - `packages/core/test/unit/utils/paths.test.ts`
      - `packages/core/test/unit/utils/package.json`
      - `packages/core/test/unit/utils/path.js`
      - `packages/core/test/unit/utils/path.ts`
    
    ### 关键代码变更
    
    #### `packages/core/src/utils/paths.ts`
    ```typescript
    // Improve the detection of remote paths in the 'resolve' function. Now 'http' parameters that start with '//' are considered remote paths.
    ```
    
    #### `packages/core/test/unit/utils/paths.test.ts`
    ```typescript
    it('returns URL object when resolving a relative package image and the parameter starts with "//"', () => {
      const result = resolvePath('//example.com/image.jpg');
      expect(result).toBeInstanceOf(URL);
    });
    ```
    
    #### `packages/core/test/unit/utils/package.json`
    ```json
    {
      "dependencies": {
        "url": "^0.11.0"
      }
    }
    ```
    
    #### `packages/core/test/unit/utils/path.js`
    ```javascript
    const url = require('url');
    
    function resolvePath(path) {
      if (path.startsWith('//')) {
        return new URL(`http:${path}`);
      }
      // other logic...
    }
    ```
    
    #### `packages/core/test/unit/utils/path.ts`
    ```typescript
    import { URL } from 'url';
    
    function resolvePath(path: string): string | URL {
      if (path.startsWith('//')) {
        return new URL(`http:${path}`);
      }
      // other logic...
    }
    ```
    
    ### 漏洞关键点
    - **相对路径检测增强**: 在`resolve`函数中,现在以`//`开头的`http`参数被视为远程路径。
    - **测试用例添加**: 添加了针对相对路径解析的测试用例,确保以`//`开头的路径能够正确解析为URL对象。
    - **依赖项更新**: 引入了`url`库来处理URL解析。
    
    这些变更表明项目在处理相对路径和远程路径时进行了改进,以提高安全性和正确性。
                                            
    Merge commit from fork · withastro/astro@4d16de7 · GitHub
  • https://nvd.nist.gov/vuln/detail/CVE-2025-55303
四、漏洞 CVE-2025-55303 的评论

暂无评论


发表评论