目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2011-4367 PoC — Apache MyFaces Core ‘ln’ 参数目录遍历漏洞

来源
关联漏洞
标题: Apache MyFaces Core ‘ln’ 参数目录遍历漏洞 (CVE-2011-4367)
Description:Apache MyFaces是美国阿帕奇(Apache)软件基金会的一个项目,它实现了JavaServer Faces(JSF,一个用于构建Web应用程序的标准Java框架)。Core是其中的一个实现了JSF 1.1、JSF 1.2、JSF 2.0和JSF 2.1规范的子项目。 Apache MyFaces Core 2.0.0至2.0.111 版本和2.1.0至2.1.5版本的MyFaces JSF中存在目录遍历漏洞,该漏洞源于faces/javax.faces.resource/web.xml页面没有
介绍
<div align="center">
<img src="https://myfaces.apache.org/resources/images/myfaces-small.png" width="384" height="143" />
</div>
<br>

![Maven Central](https://img.shields.io/maven-central/v/org.apache.myfaces.core/myfaces-impl)
[![Build Status](https://github.com/apache/myfaces/workflows/MyFaces%20CI/badge.svg)](https://github.com/apache/myfaces/actions/workflows/myfaces-ci.yml)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Build Status ASF](https://ci-builds.apache.org/buildStatus/icon?subject=ASF-Build&job=MyFaces%2FMyFaces+Pipeline%2Fmain)](https://ci-builds.apache.org/job/MyFaces/job/MyFaces%20Pipeline/job/main/)

Apache's implementation of the JavaServer Faces (JSF) and Jakarta Faces specification

## Branches

### main

Jakarta Faces 5.0 implementation  

### 4.1.x
![4.1.x](https://img.shields.io/maven-central/v/org.apache.myfaces.core/myfaces-impl?versionPrefix=4.1&color=cyan)
Jakarta Faces 4.1 implementation  

### 4.0.x
![4.0.x](https://img.shields.io/maven-central/v/org.apache.myfaces.core/myfaces-impl?versionPrefix=4.0&color=cyan)
Jakarta Faces 4.0 implementation  
Based on the refactored 2.3-next codebase

### 2.3-next
![2.3-next](https://img.shields.io/maven-central/v/org.apache.myfaces.core/myfaces-impl?versionPrefix=2.3-next&color=cyan)
(Almost) JavaServer Faces 2.3 implementation  
Completely refactored codebase compared to 2.3, also providing a Quarkus extension  
2.3-next equals the JSF 2.3 API but delegates @ManagedBeans to CDI; ManagedBeans configured via XML are completely ignored. The implementation of the old FacesEL (javax.faces.el.*) also has been completely removed.

### 2.3.x
![2.3](https://img.shields.io/maven-central/v/org.apache.myfaces.core/myfaces-impl?versionPrefix=2.3&color=cyan)
JavaServer Faces 2.3 implementation


## Minimum Requirements (main)

- Java 17+
- Servlet 5.0+
- EL 5.0+
- CDI 4.0+
- JSTL 3.0+ (optional)
- BV 3.0+ (optional)

## Installation

mvn clean install

## Usage

### Dependency
```xml
<dependency>
    <groupId>org.apache.myfaces.core</groupId>
    <artifactId>myfaces-api</artifactId>
    <version>5.0.0-SNAPSHOT</version>
</dependency>
<dependency>
    <groupId>org.apache.myfaces.core</groupId>
    <artifactId>myfaces-impl</artifactId>
    <version>5.0.0-SNAPSHOT</version>
</dependency>
```

### web.xml
```xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"
         version="5.0">

    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>jakarta.faces.webapp.FacesServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.xhtml</url-pattern>
    </servlet-mapping>

</web-app>
```

### index.xhtml
```xml
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:f="jakarta.faces.core"
  xmlns:h="jakarta.faces.html">

  <h:head>

  </h:head>

  <h:body>

    Hello World!

  </h:body>
</html>
```

## Quarkus extension

Since 2.3-next a Quarkus extension is available. A sample project can be found here: https://github.com/apache/myfaces/blob/main/extensions/quarkus/showcase/

### Not supported features:
- Quarkus does not support session replication / passivation / clustering
- Quarkus beans are not serializable and therefore session passivation would never work anyway
- Quarkus does not implement `@ConversationScoped`
- Quarkus does not support injection in normal objects, therefore injection in JSF artifacts like NavigationHandler etc. is not supported

### Differences to a normal servlet container while developing
- You need to put your views under `src/main/resources/META-INF/resources` as Quarkus doesn't create a WAR and src/main/webapp is ignored!

文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →