{
    "CVE_data_meta": {
        "ASSIGNER": "security@apache.org",
        "ID": "CVE-2021-45105",
        "STATE": "PUBLIC",
        "TITLE": "Apache Log4j2 does not always protect from infinite recursion in lookup evaluation"
    },
    "affects": {
        "vendor": {
            "vendor_data": [
                {
                    "product": {
                        "product_data": [
                            {
                                "product_name": "Apache Log4j2",
                                "version": {
                                    "version_data": [
                                        {
                                            "version_affected": "<",
                                            "version_name": "log4j-core",
                                            "version_value": "2.17.0"
                                        },
                                        {
                                            "version_affected": ">=",
                                            "version_name": "log4j-core",
                                            "version_value": "2.13.0"
                                        },
                                        {
                                            "version_affected": "<",
                                            "version_name": "log4j-core",
                                            "version_value": "2.12.3"
                                        },
                                        {
                                            "version_affected": ">=",
                                            "version_name": "log4j-core",
                                            "version_value": "2.4"
                                        },
                                        {
                                            "version_affected": "<",
                                            "version_name": "log4j-core",
                                            "version_value": "2.3.1"
                                        },
                                        {
                                            "version_affected": ">=",
                                            "version_name": "log4j-core",
                                            "version_value": "2.0-alpha1"
                                        }
                                    ]
                                }
                            }
                        ]
                    },
                    "vendor_name": "Apache Software Foundation"
                }
            ]
        }
    },
    "credit": [
        {
            "lang": "eng",
            "value": "Independently discovered by Hideki Okamoto of Akamai Technologies, Guy Lederfein of Trend Micro Research working with Trend Micro\u2019s Zero Day Initiative, and another anonymous vulnerability researcher"
        }
    ],
    "data_format": "MITRE",
    "data_type": "CVE",
    "data_version": "4.0",
    "description": {
        "description_data": [
            {
                "lang": "eng",
                "value": "Apache Log4j2 versions 2.0-alpha1 through 2.16.0 (excluding 2.12.3 and 2.3.1) did not protect from uncontrolled recursion from self-referential lookups. This allows an attacker with control over Thread Context Map data to cause a denial of service when a crafted string is interpreted. This issue was fixed in Log4j 2.17.0, 2.12.3, and 2.3.1."
            }
        ]
    },
    "generator": {
        "engine": "Vulnogram 0.0.9"
    },
    "impact": [
        {
            "other": "high"
        }
    ],
    "problemtype": {
        "problemtype_data": [
            {
                "description": [
                    {
                        "lang": "eng",
                        "value": "CWE-20 Improper Input Validation"
                    }
                ]
            },
            {
                "description": [
                    {
                        "lang": "eng",
                        "value": "CWE-674: Uncontrolled Recursion"
                    }
                ]
            }
        ]
    },
    "references": {
        "reference_data": [
            {
                "refsource": "MISC",
                "url": "https://logging.apache.org/log4j/2.x/security.html",
                "name": "https://logging.apache.org/log4j/2.x/security.html"
            },
            {
                "refsource": "CONFIRM",
                "name": "https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2021-0032",
                "url": "https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2021-0032"
            },
            {
                "refsource": "CERT-VN",
                "name": "VU#930724",
                "url": "https://www.kb.cert.org/vuls/id/930724"
            },
            {
                "refsource": "CISCO",
                "name": "20211210 Vulnerabilities in Apache Log4j Library Affecting Cisco Products: December 2021",
                "url": "https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-apache-log4j-qRuKNEbd"
            },
            {
                "refsource": "MLIST",
                "name": "[oss-security] 20211218 CVE-2021-45105: Apache Log4j2 does not always protect from infinite recursion in lookup evaluation",
                "url": "http://www.openwall.com/lists/oss-security/2021/12/19/1"
            },
            {
                "refsource": "DEBIAN",
                "name": "DSA-5024",
                "url": "https://www.debian.org/security/2021/dsa-5024"
            },
            {
                "refsource": "CONFIRM",
                "name": "https://cert-portal.siemens.com/productcert/pdf/ssa-479842.pdf",
                "url": "https://cert-portal.siemens.com/productcert/pdf/ssa-479842.pdf"
            },
            {
                "refsource": "CONFIRM",
                "name": "https://security.netapp.com/advisory/ntap-20211218-0001/",
                "url": "https://security.netapp.com/advisory/ntap-20211218-0001/"
            },
            {
                "refsource": "MISC",
                "name": "https://www.zerodayinitiative.com/advisories/ZDI-21-1541/",
                "url": "https://www.zerodayinitiative.com/advisories/ZDI-21-1541/"
            },
            {
                "refsource": "CONFIRM",
                "name": "https://cert-portal.siemens.com/productcert/pdf/ssa-501673.pdf",
                "url": "https://cert-portal.siemens.com/productcert/pdf/ssa-501673.pdf"
            },
            {
                "url": "https://www.oracle.com/security-alerts/cpujan2022.html",
                "refsource": "MISC",
                "name": "https://www.oracle.com/security-alerts/cpujan2022.html"
            },
            {
                "url": "https://www.oracle.com/security-alerts/cpuapr2022.html",
                "refsource": "MISC",
                "name": "https://www.oracle.com/security-alerts/cpuapr2022.html"
            },
            {
                "url": "https://www.oracle.com/security-alerts/cpujul2022.html",
                "refsource": "MISC",
                "name": "https://www.oracle.com/security-alerts/cpujul2022.html"
            }
        ]
    },
    "source": {
        "defect": [
            "LOG4J2-3230"
        ],
        "discovery": "UNKNOWN"
    },
    "work_around": [
        {
            "lang": "eng",
            "value": "Implement one of the following mitigation techniques:\n\n* Java 8 (or later) users should upgrade to release 2.17.0.\n\nAlternatively, this can be mitigated in configuration:\n\n* In PatternLayout in the logging configuration, replace Context Lookups like `${ctx:loginId}` or `$${ctx:loginId}` with Thread Context Map patterns (%X, %mdc, or %MDC).\n* Otherwise, in the configuration, remove references to Context Lookups like `${ctx:loginId}` or `$${ctx:loginId}` where they originate \nfrom sources external to the application such as HTTP headers or user input."
        }
    ]
}