Skip to main content
Jdsplicer
Inspiring
December 10, 2021
Answered

zero-day exploit affecting the popular Apache Log4j utility (CVE-2021-44228)

  • December 10, 2021
  • 30 replies
  • 65943 views

Does anyone know if the zero-day exploit affecting the popular Apache Log4j utility (CVE-2021-44228) that was announced on 12/9/2021 will affect ColdFusion version 10 and 2018?

    This topic has been closed for replies.
    Correct answer Priyank Shrivastava.

    Hi Everyone,


    We had originally published (on Dec 14) some workaround/mitigation steps in this article until the patch would be released. Since then, there have been updates and still further updates.

     

    Dec 14: Technote with initial mitigations offered:

    https://helpx.adobe.com/coldfusion/kb/log4j-vulnerability-coldfusion.html

     

    Update Dec 17: Updates for CF2021 and 2018 were released, addressing this log4j vulnerability. The technote mentioned above was a preliminary response, offered on Dec 14.

     

    Update Dec 21: To address the vulnerabilities later found in log4j 2.16, those who have applied the most recent update can now implement the log4j 2.17 updates, as provided along with instructions here:

    https://helpx.adobe.com/coldfusion/kb/log4j-2-16-vulnerability-coldfusion.html 

     

    Update Jan 11 2022: To address the vulnerabilities later found in log4j 2.17, those who have applied the most recent update can now implement the log4j 2.17.1 updates, as provided along with instructions here:

    https://helpx.adobe.com/coldfusion/kb/log4j-2-17-0-vulnerability-coldfusion.html 

     

    30 replies

    Participating Frequently
    December 13, 2021

    I have also noticed that there is a 1.2.17 log4j instance in the jetty folder (ColdFusion20XX\cfusion\jetty\lib\ext). Has anyone done anything to mitigate this?

    Ripley Casdorph
    Participating Frequently
    December 13, 2021

    We downloaded the new 2.15 jar from Apache and we can put it in place and remove the 2.13 version, but where do we tell Cf to get the new file?

     

    We are now getting an error...

     

    "Unable to initialise Logging service: java.lang.NoClassDefFoundError: org/apache/logging/log4j/Logger"
    java.lang.NoClassDefFoundError: org/apache/logging/log4j/Logger
     
    So I know we need to update a config but don't know where or what.
     
    TIA
    Participating Frequently
    December 13, 2021

    You will have to stop coldfusion service
    In coldfusion/cfusion/lib folder remove the files
    log4j-api-2.13.3.jar
    log4j-core-2.13.3.jar
    log4j-to-slf4j-2.13.3.jar
    And replace them with 2.15.0 version, then restart Coldfusion

     

    No need for config update if you do that.

    Miguel-F
    Inspiring
    December 13, 2021

    Subscribing to this thread...

    Participating Frequently
    December 13, 2021

    I find it fairly surprising Adobe hasn't yet come forward with any info at all on how/if this affects CF 2018 and 2021 installs.


    Or even just short term info like if it's a good idea to deploy "patches" like the "-Dlog4j2.formatMsgNoLookups=true" argument or possibly even just straight up swap out the component with the Apache supplied version yourself.

    Participating Frequently
    December 13, 2021

    We went ahead and patched "manually" our CF servers with log4j 2.15.0 on Friday morning by just replacing the 2.13.3 libraries in the cfusion lib directory.
    Just to clarify the extent of the vulnerability, it is in all log4j version since 2.0. So, an easy way to verify if you are affected is to check if you have log4j-core 2.x jar file in your classpath.
    We have seen through our monitoring some attempts to exploit this bug and our counter measures were effective, but I am glad we patched it anyway.

    I am shocked there is not already a patch available from Adobe. This is really something they should have released already...

    jstratton77
    Participating Frequently
    December 13, 2021

    Just in case you were looking for validation, we did the exact same thing, manually placing the log4j-core 2.15.0 files in place, as well as api and slf4j jars.  I'm hopeful that that is all there is to this one, but am following this thread just in case there is more.  We are very vanilla CF here.

    Participating Frequently
    December 13, 2021

    Awesome. We did all the other recommened stuff and were thinking manual updates to 2.15.0 as well-just to be on the safe side. Any gotchas?

    Inspiring
    December 13, 2021

    Hello Experts,

    can anybody tell, if ColdFusion uses log4j to write the regular CF-Logs (application.log, exception.log etc.)?

    If it is the case, so there would be a simple attack possible: calling http://my.server.com/my_%24{java%3Aversion}_test.cfm would return 404, but log the path into exception.log

    (at the moment it seems not to happen, but just to be sure...)

     

    Peter

    BKBK
    Community Expert
    December 13, 2021

    Hi @Peter Kulla ,

    Yes, as has been mentioned in the foregoing discussion, ColdFusion uses a version of Log4J Core that is vulnerable. It is known that the vulnerability affects Log4J versions between 2.10.x and 2.14.x. The current updates of ColdFusion 2018 and ColdFusion 2021 use log4j-core-2.13.3. Which you can verify by confirming the presence of the file /lib/log4j-core-2.13.3.jar in your ColdFusion installation.

     

    I don't understand the reasoning behind your example, http://my.server.com/my_%24{java%3Aversion}_test.cfm. What has this URL got to do with the LDAP/JNDI vulnerability?

    Charlie Arehart
    Community Expert
    December 12, 2021

    I don't see anyone yet pointing to Pete Freitag's blog post on the topic, where he is gathering info on this topic, and updating it as he learns things:

    https://www.petefreitag.com/item/923.cfm


    I highly recommend it, along with this discussion thread you're now reading. Between the two, we should see clarity on all this as the smoke clears.

     

    As many know, Pete is regarded by most as THE security maven in the CF space. While he doesn't work FOR Adobe, he does work WITH them, having written the CF Lockdown Guides for the past several CF releases. 

     

    Pete also offers an excellent service that I also highly recommend, called HackmyCF (https://hackmycf.com), whose name may scare you but whose features should delight you, as it (a paid service) keeps you apprised regularly of the state of your own CF instance and need of security-related configuration improvements.

     

    Beyond that regular checking, Pete had also informed those with the service about this vuln the day it happened, within hours of it first being mentioned (and after he had had some time to gather his initial thoughts on this fast-moving target). For many, that alone is reason enough to buy the service.

     

    In fact, the first comment I made here above, where I quoted Mark Takata, was indeed from the info that Pete had shared in one of his first messages to members. Since he was quoting Mark, I assumed that was something he'd found posted elsewhere. I was torn about posting that without more specific clarification on where I got it, but I had only minutes before a series of consulting sessions that day so offered it as the first response here, trusting that more would be shared in time (as it was).

     

    I did mean to come back and add the clarification that I'd gotten it from Pete's service, and I did want to elaborate a bit on it as I have now. Again, since no one had mentioned it or his blog post (which came later that day), I wanted to get this here for the sake of the community and in thanks and with much appreciation for all Pete does.

    /Charlie (troubleshooter, carehart. org)
    Community Expert
    December 12, 2021

    I'll second this, you should all check out Pete's security work in general as well as with this specific problem.

     

    That said, I would also strongly recommend that you implement egress filtering somewhere outside of ColdFusion - at your firewall, using AWS security groups, whatever. Your front-line servers should NOT be able to just make outbound requests to just any place in the internet. This is kind of a pain to implement especially in a legacy environment, but you should have a list of all specific outbound destinations that your servers need to get to, and that list should be updated on an as-needed basis.

     

    Unfortunately, that won't stop all exploits against vulnerable servers with this CVN, attackers can still cause information leakage of things like environment variables and file paths etc. But it will prevent remote code execution through the exploit, which is LITERALLY THE WORST.

     

    Dave Watts, Eidolon LLC

    Dave Watts, Eidolon LLC
    Charlie Arehart
    Community Expert
    December 12, 2021

    Yep, Dave. And FWIW, Pete's post does also recommend disabling egress (and mentions also how Java security policies or the CF Sandbox feature could help with that).

     

    All that said, I will note that I have been trying and trying to cause the vuln in CF and have not yet been able to (even when I LITERALLY cflog the $strings identified in resources about it. I've tried many variants and hope to write up another message with more info).

     

    In the meantime, if anyone might share any specific thing that they confirm DID prove the vulnerability within CF, please do share it. I realize some may think "that's crazy, don't publicize that", but I am for now not talking about a request that could be made from the outside. I mean just something that one would have to write CFML, in order to demonstrate the impact of the vuln being executed. 

    /Charlie (troubleshooter, carehart. org)
    Charlie Arehart
    Community Expert
    December 11, 2021

    Here's a really helpful resource from Cloudflare on what they have found regarding this vuln. They actually posted a few entries yesterday. This one talks more about the details of how it might lead to trouble, and how one could try to detect the problem (and how bad guys are doing that).

     

    They also share how they are now blocking it for folks, via their WAF, which they also say they are enabling for free account holders. I'll leave you read more about it, and the other resources they have and that they point to (from others).

     

    It's a good place to start, for folks wondering about more than just "there's a zero day!" And as I shared in another comment here, we have Adobe and Pete and others (including myself, I hope) who are doing more digging into the specifics for CF.

     

    https://blog.cloudflare.com/inside-the-log4j2-vulnerability-cve-2021-44228/

    /Charlie (troubleshooter, carehart. org)
    New Participant
    December 12, 2021

    Three questions:

    - Can we expect a Coldfusion update in the next days?

    - Is it secure if the -Dlog4j2.formatMsgNoLookups=true was set in Coldfusion 2018?

    - Is Coldfusion 2016 not affected?

    Charlie Arehart
    Community Expert
    December 12, 2021

    Only Adobe can answer your first question, of course. As for the next two, it's unclear. Work is being done by many to ascertain clarity: is CF affected at all, if so what versions, how is it vulnerable, how likely can the vuln be leveraged, etc.

     

    Then the next questions are what can we do, now before they may have a fix, and what about those on CF2016 or earlier (which are no longer updated by Adobe). Those fixes (that you will see shared here and elsewhere) have caveats, again depending on what log4j version one has (which for CF people will depend on what CF version and update they have).

     

    For now, all people can do is wade through all the info and make the best choice for themselves. I will share another message, as a top level-reply here, with a bit more info for folks to consider. 

     

    And others, from Adobe or not, may have more in reply to your specific questions, of course.

    /Charlie (troubleshooter, carehart. org)
    Jdsplicer
    JdsplicerAuthor
    Inspiring
    December 10, 2021

    Thanks all for the valuable information, much appreciated and I will continue to monitor here for any further updates. 

    Charlie Arehart
    Community Expert
    December 10, 2021

    Here's news shared initially from Mark Takata at Adobe:

    "As reported this morning, Log4J is vulnerable to a zero-day RCE exploit. Details here:

    https://www.lunasec.io/docs/blog/log4j-zero-day/

    This is being classified as a severe vulnerability, as it can be exploited to allow unauthenticated remote code execution.

    Details of the CVE here: https://www.randori.com/blog/cve-2021-44228/

    The Adobe ColdFusion engineering & support teams are currently working with the security team to examine how this exploit affects a vanilla CF2021 and CF2018 install. Initial reports seem to indicate that installs of this nature do not utilize Log4J in a way as to be exploitable, but research is just beginning so please exercise a maximum of caution, especially if your installation utilizes Log4J in a way other than the default install.

    An initial method of reducing/eliminating your vulnerability is to alter your jvm.config by adding the following line:

    -Dlog4j2.formatMsgNoLookups=true

    Once the config file is altered, you will need to do a restart of the environment to ensure it is taken up. I will share any further news about this situation as it comes in."

     

    Update: I got this quote from Pete Freitag, by way of an email sent to those of us using his excellent HackMyCF service, which I discuss more in a later comment here. Note also that Pete had later that day done a blog post with more info on this vuln, and options to consider for addressing it (while we await any official/final word from Adobe).

    /Charlie (troubleshooter, carehart. org)
    Priyank Shrivastava.
    Community Manager
    Community Manager
    December 10, 2021

    Hi Charlie,

     

    Small correction to it, we are still analyzing the impact and we don't know if this argument can help or not. Once we have further communication from Adobe security team, we will update here. 

     

     

    Thanks,Priyank Shrivastava
    Participating Frequently
    December 10, 2021

    Thanks Priyank. FYI- we are already seeing active attacks and have applied several countermeasures, but would be better to just have this patched or know if we are not actaully vulnerable.

    Michael Miller