Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Log4j and log4j2 library vulnerability

    Support
    security
    10
    31
    2830
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Mastadamus last edited by girish

      I'm not sure if you guys are tracking but unauthenticated RCE exploit just got dropped and is being exploited in the wild for log4j and log4j2 library.
      This is used in a ton of products from apache struts to elasticsearch as the default logging framework.
      Does cloudron use this and if so when can we get a patch?

      BrutalBirdie 1 Reply Last reply Reply Quote 5
      • BrutalBirdie
        BrutalBirdie Staff @Mastadamus last edited by BrutalBirdie

        @staff
        This is important.

        Cloudron tho runs mostly on java script.
        I highly doubt Cloudron it self is affected in any way.

        Here some sources:

        https://blog.cloudflare.com/cve-2021-44228-log4j-rce-0-day-mitigation/

        https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228

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

        And if you are more of a video type:

        Youtube Video

        Like my work? Consider donating a beer 🍻 Cheers!

        JOduMonT 1 Reply Last reply Reply Quote 4
        • JOduMonT
          JOduMonT @BrutalBirdie last edited by

          @brutalbirdie said in Lo4j and log4j2 library vulnerability:

          Cloudron tho runs mostly on java script.

          just to clarify, Java and Java Script are not the same, not even compatible
          JavaScript is more for the web while Java is more for embedded system.

          87fe36f3-64c3-48ea-84e3-d17fcfb0510c-image.png

          1 Reply Last reply Reply Quote 3
          • nebulon
            nebulon Staff last edited by

            Right so Cloudron as the platform is not affected by this as far as I understand. We don't use log4j(2).

            With regards to apps which may potentially use it, I only found Metabase to be using it at least, but so far hard to tell how and if that is affected.

            1 Reply Last reply Reply Quote 6
            • nebulon
              nebulon Staff last edited by

              Ok so metabase and grafana packages are now updated to have a fix for this vulnerability.

              Let us know if further apps I might have missed just now, also require fixes.

              M jdaviescoates 2 Replies Last reply Reply Quote 8
              • M
                Mastadamus @nebulon last edited by

                @nebulon awesome. Thank yall for hopping on this. This was huge.

                1 Reply Last reply Reply Quote 1
                • jdaviescoates
                  jdaviescoates @nebulon last edited by jdaviescoates

                  @nebulon said in Lo4j and log4j2 library vulnerability:

                  Ok so metabase and grafana packages are now updated to have a fix for this vulnerability.

                  Let us know if further apps I might have missed just now, also require fixes.

                  Looks like Minecraft needs an update too:

                  @loudlemur said in Security: Log4shell:

                  There is a serious security problem with minecraft:
                  https://www.abc.net.au/news/2021-12-11/log4shell-techs-race-to-fix-software-flaw/100692876

                  I don't know if this effects Cloudron's software, but it is already weaponized, apparently.

                  I use Cloudron with Gandi & Hetzner

                  M 1 Reply Last reply Reply Quote 1
                  • M
                    Mastadamus @jdaviescoates last edited by

                    @jdaviescoates Its heavily weaponized. Like if you have an app thats affected chances are its going to get popped if you leave it unmitigated. Broad array of actors are exploiting it.. from coin miners to more advanced threats. Grey noise is tracking the IP's associated with the threat campaigns and right now they are numerous.

                    1 Reply Last reply Reply Quote 1
                    • P
                      privsec last edited by

                      Nextcloud, mincraft, use this, right?

                      M 2 Replies Last reply Reply Quote 0
                      • M
                        Mastadamus @privsec last edited by

                        @privsec I'm already receiving exploit/scan attempts inbound. No successful exploits. I believe nothing in my cloudron stack uses it. I can't find any confirmation nextcloud does. If you find something i'd love it asap.

                        1 Reply Last reply Reply Quote 1
                        • Referenced by  BrutalBirdie BrutalBirdie 
                        • M
                          Mastadamus @privsec last edited by

                          @privsec I tested nextcloud with a log4j2 testing tool from huntress and I couldn't get it to callback to the ldap server so i think its gtg.

                          necrevistonnezr 1 Reply Last reply Reply Quote 1
                          • necrevistonnezr
                            necrevistonnezr @Mastadamus last edited by necrevistonnezr

                            Here's a maintained list with log4j advisories: https://gist.github.com/SwitHak/b66db3a06c2955a9cb71a8718970c592

                            log4j detector: https://github.com/mergebase/log4j-detector

                            "Vaccine": https://www.bleepingcomputer.com/news/security/researchers-release-vaccine-for-critical-log4shell-vulnerability/

                            rmdes 1 Reply Last reply Reply Quote 2
                            • rmdes
                              rmdes @necrevistonnezr last edited by rmdes

                              Docker Scan should allow us to scan cloudron containers if any doubt remains :
                              https://www.docker.com/blog/apache-log4j-2-cve-2021-44228/

                              edit : https://github.com/docker/scan-cli-plugin/releases/tag/v0.11.0

                              rmdes M 2 Replies Last reply Reply Quote 1
                              • rmdes
                                rmdes @rmdes last edited by

                                This tool is also neat, with or without cloudron context : https://github.com/fullhunt/log4j-scan

                                1 Reply Last reply Reply Quote 3
                                • girish
                                  girish Staff last edited by

                                  "Log4j 2.15.0 and previously suggested mitigations may not be enough" - https://isc.sans.edu/diary/Log4j+2.15.0+and+previously+suggested+mitigations+may+not+be+enough/28134

                                  necrevistonnezr 1 Reply Last reply Reply Quote 1
                                  • necrevistonnezr
                                    necrevistonnezr @girish last edited by

                                    @girish I ran https://github.com/mergebase/log4j-detector today and it seems that at least SOLR is vulnerable(?)

                                    /proc/5961/task/9300/cwd/lib/ext/log4j-core-2.14.1.jar contains Log4J-2.x   >= 2.10.0 _VULNERABLE_ :-(
                                    /var/lib/docker/overlay2/32ab0d12f3342918d0ffea4a1392cb760f852f9bf0a219c682dd366ff26e72bc/diff/usr/share/java/log4j-1.2-1.2.17.jar contains Log4J-1.x   <= 1.2.17 _OLD_ :-|
                                    /var/lib/docker/overlay2/5bb4ce30d32c6760fe21e98ab6f98651bf9591e83ab2385f0a4833ee5ef0c979/diff/app/code/solr/contrib/prometheus-exporter/lib/log4j-core-2.14.1.jar contains Log4J-2.x   >= 2.10.0 _VULNERABLE_ :-(
                                    /var/lib/docker/overlay2/5bb4ce30d32c6760fe21e98ab6f98651bf9591e83ab2385f0a4833ee5ef0c979/diff/app/code/solr/server/lib/ext/log4j-core-2.14.1.jar contains Log4J-2.x   >= 2.10.0 _VULNERABLE_ :-(
                                    /var/lib/docker/overlay2/f8ed382cc2590afd6189335f84aaf0f561811a5165dbf58191be61048c5312f5/merged/app/code/solr/contrib/prometheus-exporter/lib/log4j-core-2.14.1.jar contains Log4J-2.x   >= 2.10.0 _VULNERABLE_ :-(
                                    /var/lib/docker/overlay2/f8ed382cc2590afd6189335f84aaf0f561811a5165dbf58191be61048c5312f5/merged/app/code/solr/server/lib/ext/log4j-core-2.14.1.jar contains Log4J-2.x   >= 2.10.0 _VULNERABLE_ :-(
                                    
                                    BrutalBirdie 1 Reply Last reply Reply Quote 2
                                    • BrutalBirdie
                                      BrutalBirdie Staff @necrevistonnezr last edited by

                                      @nebulon ping
                                      Can you check that out?

                                      Like my work? Consider donating a beer 🍻 Cheers!

                                      nebulon 1 Reply Last reply Reply Quote 1
                                      • nebulon
                                        nebulon Staff @BrutalBirdie last edited by

                                        @brutalbirdie just because the library is used, does not mean the app is actually vulnerable. In either case all we can really do from our side is to closely track upstream releases during such times and release new app packages asap. We usually can't really patch the upstream apps easily. In this case it seem to be prometheus related? @necrevistonnezr do you know to which app those layers in your case are related to?

                                        necrevistonnezr 1 Reply Last reply Reply Quote 2
                                        • necrevistonnezr
                                          necrevistonnezr @nebulon last edited by

                                          @nebulon The only SOLR instance is the Cloudron internal mail indexing, in my case.

                                          nebulon 1 Reply Last reply Reply Quote 0
                                          • nebulon
                                            nebulon Staff @necrevistonnezr last edited by

                                            @necrevistonnezr ah ok, then this is fine. It is not exposed or anything.

                                            3 1 Reply Last reply Reply Quote 0
                                            • girish
                                              girish Staff last edited by

                                              I am aware of solr being detected by the static analyzers (the marketplace images complain about the same). solr is used internally for full text search in the mail container. It's not on by default and it's also not exposed outside the internal docker network (so not exposed to outside world).

                                              Still, we will update the mail container. Solr only put out a new release yesterday which update log4j.

                                              M 1 Reply Last reply Reply Quote 3
                                              • M
                                                Mastadamus @girish last edited by

                                                @girish min patch to rectify log4j2 issues is 2.16 .. 2.15 is affected by cvss 9.0 rce in some instances.

                                                1 Reply Last reply Reply Quote 4
                                                • M
                                                  Mastadamus @rmdes last edited by

                                                  @rmdes good suggestion.

                                                  M 1 Reply Last reply Reply Quote 0
                                                  • M
                                                    Mastadamus @Mastadamus last edited by

                                                    @mastadamus I'm happy to report that Crowdsec successfully responded to a log4j exploit scanner. If you set up your nginx log configuration per my post in support, and install the nginx collection as well as the log4j2 collection with an firewall iptable bouncer it will auto block any ip belonging to an attempt it parses out.

                                                    crowdsec crowdsecurity/apache_log4j2_cve-2021-44228 Ip 45.83.65.33 2021-12-17 07:55:25 2021-12-17 07:55:25

                                                    rmdes 1 Reply Last reply Reply Quote 3
                                                    • rmdes
                                                      rmdes @Mastadamus last edited by

                                                      @mastadamus do you have a step by step instructions to setup crowdsec in a cloudron context ?

                                                      M 2 Replies Last reply Reply Quote 1
                                                      • M
                                                        Mastadamus @rmdes last edited by

                                                        @rmdes I'll put one together later tonight.

                                                        1 Reply Last reply Reply Quote 1
                                                        • M
                                                          Mastadamus @rmdes last edited by

                                                          @rmdes https://forum.cloudron.io/topic/6224/crowdsec-install-guide-for-cloudron-purposes

                                                          rmdes 1 Reply Last reply Reply Quote 5
                                                          • rmdes
                                                            rmdes @Mastadamus last edited by

                                                            @mastadamus thanks alot, will try to implement this & will report under your post 🙂

                                                            1 Reply Last reply Reply Quote 1
                                                            • 3
                                                              3gal @nebulon last edited by

                                                              @nebulon I found log4j2 libary usage in kutt (urlshortener)

                                                              Standard config:

                                                              # ONLY NEEDED FOR MIGRATION !!1!
                                                              # Neo4j database credential details
                                                              NEO4J_DB_URI=bolt://localhost
                                                              NEO4J_DB_USERNAME=
                                                              NEO4J_DB_PASSWORD=
                                                              

                                                              changed to this without errors:

                                                              # ONLY NEEDED FOR MIGRATION !!1!
                                                              # Neo4j database credential details
                                                              #NEO4J_DB_URI=bolt://localhost
                                                              #NEO4J_DB_USERNAME=neo4j
                                                              #NEO4J_DB_PASSWORD=BjEphmupAf1D5pDD
                                                              

                                                              Is there anything else to do?
                                                              Is that even a issue?

                                                              girish 1 Reply Last reply Reply Quote 2
                                                              • girish
                                                                girish Staff @3gal last edited by

                                                                @3gal neo4j and log4j are different. the former is a database and the latter is logging library. Kutt anyway is written in typescript and not affected by log4j issue.

                                                                3 1 Reply Last reply Reply Quote 3
                                                                • 3
                                                                  3gal @girish last edited by

                                                                  @girish ah i didnt even notice bevause of all the 4j notices my eyes where too open 🐶

                                                                  thx for looking at this anyway

                                                                  1 Reply Last reply Reply Quote 0
                                                                  • First post
                                                                    Last post
                                                                  Powered by NodeBB