Re: Maven Dependency Plugin - Log4j vulnerabilities

2022-03-04 Thread Piotr Żygieło
> https://github.com/jveverka/mvn-dependency-log4j/commit/ac87977c19bb2ee2564d15fa87f255d621a4706d
https://github.com/pzygielo/mvn-dependency-log4j/runs/5425284512?check_suite_focus=true#step:5:1

No log4j:1.2.12:jar is downloaded in that reproducer.

log4j/log4j is excluded by commons-logging from its dependencies.

-- 
Piotrek


Re: Maven Dependency Plugin - Log4j vulnerabilities

2022-03-02 Thread Piotr Żygieło
On Thu, 3 Mar 2022 at 08:37, Thomas Matthijs  wrote:
>
> Can confirm this project downloads log4j 1.12.12 for me

As I see it - you confirm something else.

> Failed to read artifact descriptor for log4j:log4j:jar:1.2.12:

Failed to read artifact descriptor for log4j:log4j:jar:1.2.12:
_artifact descriptor_

-- 
Piotrek


Re: Maven Dependency Plugin - Log4j vulnerabilities

2022-03-02 Thread John Patrick
You might need to raise a bug with your security scanner regarding false
positives.

So your dependency tree I only see log4j 2.17.1; i.e.

Your Pom
- org.springframework.boot:spring-boot-starter-web:2.6.4
-- org.springframework.boot:spring-boot-starter-web:2.6.4
--- org.springframework.boot:spring-boot-starter:2.6.4
 org.springframework.boot:spring-boot-starter-logging:2.6.4
- org.apache.logging.log4j:log4j-to-slf4j:2.17.1
-- org.apache.logging.log4j:log4j-api:2.17.1

Doing a build "mvn clean install -Dmaven.repo.local=repo"
Then "find repo -name "*log4j*" -type f", only returns;
repo/org/apache/logging/log4j/log4j-api/2.17.1/log4j-api-2.17.1.jar
repo/org/apache/logging/log4j/log4j-api/2.17.1/log4j-api-2.17.1.pom.sha1
repo/org/apache/logging/log4j/log4j-api/2.17.1/log4j-api-2.17.1.pom
repo/org/apache/logging/log4j/log4j-api/2.17.1/log4j-api-2.17.1.jar.sha1
repo/org/apache/logging/log4j/log4j-to-slf4j/2.17.1/log4j-to-slf4j-2.17.1.pom
repo/org/apache/logging/log4j/log4j-to-slf4j/2.17.1/log4j-to-slf4j-2.17.1.pom.sha1
repo/org/apache/logging/log4j/log4j-to-slf4j/2.17.1/log4j-to-slf4j-2.17.1.jar
repo/org/apache/logging/log4j/log4j-to-slf4j/2.17.1/log4j-to-slf4j-2.17.1.jar.sha1
repo/org/apache/logging/log4j/log4j-bom/2.17.1/log4j-bom-2.17.1.pom
repo/org/apache/logging/log4j/log4j-bom/2.17.1/log4j-bom-2.17.1.pom.sha1
repo/org/apache/logging/log4j/log4j/2.17.1/log4j-2.17.1.pom.sha1
repo/org/apache/logging/log4j/log4j/2.17.1/log4j-2.17.1.pom
repo/log4j/log4j/1.2.12/log4j-1.2.12.pom
repo/log4j/log4j/1.2.12/log4j-1.2.12.pom.sha1

What version does the scanner say its found?

John


On Mon, 28 Feb 2022 at 23:15, Juraj Veverka
 wrote:

> Hi David
>
> Just for clarification: we are not relying on the maven dependency plugin
> at runtime. Our runtime is perfectly clear of log4j vulnerabilities.
> The problem is that our security scanners are scanning gitlab runner nodes
> (virtual machines on which we compile and package our application) and
> log4j vulnerability is found there.
>
> Kind regards
> Juraj Veverka
>
> On Mon, Feb 28, 2022 at 1:32 PM Juraj Veverka <
> juraj.veve...@globallogic.com>
> wrote:
>
> > Hi David
> >
> > Many thanks for your email, I really appreciate your reply. This is an
> > isolated example of the problem.
> > https://github.com/jveverka/mvn-dependency-log4j
> > You can find all repro steps there. In case of any questions, feel free
> > to contact me.
> >
> > Kind regards
> > Juraj Veverka
> >
> >
> >
> > On Mon, Feb 28, 2022 at 12:14 PM David Milet 
> > wrote:
> >
> >> Where I work we decided to address log4j vulnerabilities only for
> >> components directly used by the application and actually performing
> logging.
> >> We ignored transitive dependencies and maven plug-ins.
> >> I’m curious about this use case from Venu though, what application would
> >> rely on the maven dependency plugin at runtime? Does it mean you’re
> pulling
> >> maven dependencies after application startup?
> >>
> >> > On Feb 28, 2022, at 03:30, Slawomir Jaranowski <
> s.jaranow...@gmail.com>
> >> wrote:
> >> >
> >> > Hi,
> >> >
> >> > Please provide more information, like plugin, mven, os version.
> >> >
> >> > We also need an example project which reproduces your issue.
> >> > When we can't reproduce we can't help.
> >> >
> >> > pon., 28 lut 2022 o 08:55 Jaladi, Venumadhav
> >> >  napisał(a):
> >> >
> >> >> Hi team,
> >> >>
> >> >> Can I expect any response?  Is this the right email address for my
> >> >> question?
> >> >>
> >> >> Thanks,
> >> >> Venu
> >> >>
> >> >>
> >> >>> On Thu, Feb 24, 2022 at 6:47 AM Jaladi, Venumadhav <
> >> >>> jaladi.venumad...@verizon.com> wrote:
> >> >>>
> >> >>> Hi team,
> >> >>>
> >> >>> We are using the Maven Dependency Plugin in one of our projects and
> >> our
> >> >>> scanning tools are showing multiple vulnerabilities related to Log4j
> >> >>> (CVE-2019-17571, CVE-2020-9488, CVE-2022-23302, CVE-2022-23305,
> >> >>> CVE-2022-23307 and CVE-2021-4104).
> >> >>>
> >> >>> We would  like to know if there are any plans to release a newer
> >> version
> >> >>> of Maven Dependency Plugin with the fixes of these
> >> >>> vulnerabilities(referring to the latest version of Log4j libraries).
> >> If
> >> >>> so, is there any planned date for this release?
> >> >>>
> >> >>> Please let us know any any more information is required.
> >> >>>
> >> >>> Thanks,
> >> >>> Venu
> >> >>>
> >> >>
> >> >
> >> >
> >> > --
> >> > Sławomir Jaranowski
> >>
> >>
> >
> > --
> >
> > Best Regards
> >
> >
> > --
> >
> > Juraj Veverka  | Solution Design Architect
> >
> > M +421 917 521 285
> >
> > www.globallogic.sk  
> >
> >    [image: GLTwitter]
> > 
> > 
> > 
> > 
> >
> > http://www.globallogic.com/Disclai

Re: Maven Dependency Plugin - Log4j vulnerabilities

2022-03-02 Thread Jaladi, Venumadhav
Hi,

Below I am pasting some of the information on the 3 vulnerabilities from
our report.  FYI, I removed the information about the server details and
also trimmed the file path.  This report is generated by the Tenable agent.

Severity scandate Vuln Name Description Summary Fix CVE ID CVS Base
Score Plugin
Output
Critical 3/02/2022 Apache Log4j Unsupported Version Detection According to
its self-reported version number, the installation of Apache Log4j on the
remote host is no longer supported. Log4j reached its end of life prior to
2016.

Lack of support implies that no new security patches for the product will
be released by the vendor. As a result, it is likely to contain security
vulnerabilities. A logging library running on the remote host is no longer
supported. Upgrade to a version of Apache Log4j that is currently supported.

Upgrading to the latest versions for Apache Log4j is highly recommended as
intermediate versions / patches have known high severity vulnerabilities
and the vendor is updating their advisories often as new research and
knowledge about the impact of Log4j is discovered. Refer to
https://logging.apache.org/log4j/2.x/security.html for the latest versions.
  10 Path  :
.../.m2/repository/log4j/log4j/1.2.12/log4j-1.2.12.jar
  Installed version : 1.2.12
Critical 3/02/2022 Apache Log4j 1.x Multiple Vulnerabilities According to
its self-reported version number, the installation of Apache Log4j on the
remote host is 1.x and is no longer supported. Log4j reached its end of
life prior to 2016. Additionally, Log4j 1.x is affected by multiple
vulnerabilities, including :

  - Log4j includes a SocketServer that accepts serialized log events and
deserializes them without verifying whether the objects are allowed or
not. This can provide an attack vector that can be exploited.
(CVE-2019-17571)

  - Improper validation of certificate with host mismatch in Apache Log4j
SMTP appender. This could allow an SMTPS connection to be intercepted
by a man-in-the-middle attack which could leak any log messages sent
through that appender. (CVE-2020-9488)

  - JMSSink uses JNDI in an unprotected manner allowing any application
using the JMSSink to be vulnerable if it is configured to reference an
untrusted site or if the site referenced can be accesseed by the attacker.
(CVE-2022-23302)

Lack of support implies that no new security patches for the product will
be released by the vendor. As a result, it is likely to contain security
vulnerabilities. A logging library running on the remote host has multiple
vulnerabilities. Upgrade to a version of Apache Log4j that is currently
supported.

Upgrading to the latest versions for Apache Log4j is highly recommended as
intermediate versions / patches have known high severity vulnerabilities
and the vendor is updating their advisories often as new research and
knowledge about the impact of Log4j is discovered. Refer to
https://logging.apache.org/log4j/2.x/security.html for the latest
versions. CVE-2019-17571,
CVE-2020-9488, CVE-2022-23302, CVE-2022-23305, CVE-2022-23307 10 Path
: .../.m2/repository/log4j/log4j/1.2.12/log4j-1.2.12.jar
  Installed version : 1.2.12
High 3/02/2022 Apache Log4j 1.2 JMSAppender Remote Code Execution
(CVE-2021-4104) The version of Apache Log4j on the remote host is 1.2. It
is, therefore, affected by a remote code execution vulnerability when
specifically configured to use JMSAppender.

Note that Nessus has not tested for these issues but has instead relied
only on the application's self-reported version number. A package installed
on the remote host is affected by a remote code execution
vulnerability. Upgrade
to Apache Log4j version 2.16.0 or later since 1.x is end of life.

Upgrading to the latest versions for Apache Log4j is highly recommended as
intermediate versions / patches have known high severity vulnerabilities
and the vendor is updating their advisories often as new research and
knowledge about the impact of Log4j is discovered. Refer to
https://logging.apache.org/log4j/2.x/security.html for the latest versions.
CVE-2021-4104 6 Path  :
.../.m2/repository/log4j/log4j/1.2.12/log4j-1.2.12.jar
  Installed version : 1.2.12
  Fixed version : 2.16.0

Thanks,
Venu


On Tue, Mar 1, 2022 at 3:09 PM John Patrick  wrote:

> You might need to raise a bug with your security scanner regarding false
> positives.
>
> So your dependency tree I only see log4j 2.17.1; i.e.
>
> Your Pom
> - org.springframework.boot:spring-boot-starter-web:2.6.4
> -- org.springframework.boot:spring-boot-starter-web:2.6.4
> --- org.springframework.boot:spring-boot-starter:2.6.4
>  org.springframework.boot:spring-boot-starter-logging:2.6.4
> - org.apache.logging.log4j:log4j-to-slf4j:2.17.1
> -- org.apache.logging.log4j:log4j-api:2.17.1
>
> Doing a build "mvn clean install -Dmaven.repo.local=repo"
> Then "find repo -name "*log4j*" -type f", only returns;
> repo/org/apache/logging/log4j/log4j-api/2.17.1/log4j-a

Re: Maven Dependency Plugin - Log4j vulnerabilities

2022-02-28 Thread Juraj Veverka
Hi David

Just for clarification: we are not relying on the maven dependency plugin
at runtime. Our runtime is perfectly clear of log4j vulnerabilities.
The problem is that our security scanners are scanning gitlab runner nodes
(virtual machines on which we compile and package our application) and
log4j vulnerability is found there.

Kind regards
Juraj Veverka

On Mon, Feb 28, 2022 at 1:32 PM Juraj Veverka 
wrote:

> Hi David
>
> Many thanks for your email, I really appreciate your reply. This is an
> isolated example of the problem.
> https://github.com/jveverka/mvn-dependency-log4j
> You can find all repro steps there. In case of any questions, feel free
> to contact me.
>
> Kind regards
> Juraj Veverka
>
>
>
> On Mon, Feb 28, 2022 at 12:14 PM David Milet 
> wrote:
>
>> Where I work we decided to address log4j vulnerabilities only for
>> components directly used by the application and actually performing logging.
>> We ignored transitive dependencies and maven plug-ins.
>> I’m curious about this use case from Venu though, what application would
>> rely on the maven dependency plugin at runtime? Does it mean you’re pulling
>> maven dependencies after application startup?
>>
>> > On Feb 28, 2022, at 03:30, Slawomir Jaranowski 
>> wrote:
>> >
>> > Hi,
>> >
>> > Please provide more information, like plugin, mven, os version.
>> >
>> > We also need an example project which reproduces your issue.
>> > When we can't reproduce we can't help.
>> >
>> > pon., 28 lut 2022 o 08:55 Jaladi, Venumadhav
>> >  napisał(a):
>> >
>> >> Hi team,
>> >>
>> >> Can I expect any response?  Is this the right email address for my
>> >> question?
>> >>
>> >> Thanks,
>> >> Venu
>> >>
>> >>
>> >>> On Thu, Feb 24, 2022 at 6:47 AM Jaladi, Venumadhav <
>> >>> jaladi.venumad...@verizon.com> wrote:
>> >>>
>> >>> Hi team,
>> >>>
>> >>> We are using the Maven Dependency Plugin in one of our projects and
>> our
>> >>> scanning tools are showing multiple vulnerabilities related to Log4j
>> >>> (CVE-2019-17571, CVE-2020-9488, CVE-2022-23302, CVE-2022-23305,
>> >>> CVE-2022-23307 and CVE-2021-4104).
>> >>>
>> >>> We would  like to know if there are any plans to release a newer
>> version
>> >>> of Maven Dependency Plugin with the fixes of these
>> >>> vulnerabilities(referring to the latest version of Log4j libraries).
>> If
>> >>> so, is there any planned date for this release?
>> >>>
>> >>> Please let us know any any more information is required.
>> >>>
>> >>> Thanks,
>> >>> Venu
>> >>>
>> >>
>> >
>> >
>> > --
>> > Sławomir Jaranowski
>>
>>
>
> --
>
> Best Regards
>
>
> --
>
> Juraj Veverka  | Solution Design Architect
>
> M +421 917 521 285
>
> www.globallogic.sk  
>
>    [image: GLTwitter]
> 
> 
> 
> 
>
> http://www.globallogic.com/Disclaimer.htm
>
>
>

-- 

Best Regards


--

Juraj Veverka  | Solution Design Architect

M +421 917 521 285

www.globallogic.sk  

   [image: GLTwitter]





http://www.globallogic.com/Disclaimer.htm


Re: Maven Dependency Plugin - Log4j vulnerabilities

2022-02-28 Thread Enrico Olivelli
Juraj,
I have run this command on your reproducer and in "tmp" I cannot find
log4j versions other then 2.17.1

mvn clean install -X -Dmaven.repo.local=tmp > out.txt

Enrico

Il giorno lun 28 feb 2022 alle ore 13:52 Juraj Veverka
 ha scritto:
>
> Hi David
>
> Many thanks for your email, I really appreciate your reply. This is an
> isolated example of the problem.
> https://github.com/jveverka/mvn-dependency-log4j
> You can find all repro steps there. In case of any questions, feel free
> to contact me.
>
> Kind regards
> Juraj Veverka
>
>
>
> On Mon, Feb 28, 2022 at 12:14 PM David Milet  wrote:
>
> > Where I work we decided to address log4j vulnerabilities only for
> > components directly used by the application and actually performing logging.
> > We ignored transitive dependencies and maven plug-ins.
> > I’m curious about this use case from Venu though, what application would
> > rely on the maven dependency plugin at runtime? Does it mean you’re pulling
> > maven dependencies after application startup?
> >
> > > On Feb 28, 2022, at 03:30, Slawomir Jaranowski 
> > wrote:
> > >
> > > Hi,
> > >
> > > Please provide more information, like plugin, mven, os version.
> > >
> > > We also need an example project which reproduces your issue.
> > > When we can't reproduce we can't help.
> > >
> > > pon., 28 lut 2022 o 08:55 Jaladi, Venumadhav
> > >  napisał(a):
> > >
> > >> Hi team,
> > >>
> > >> Can I expect any response?  Is this the right email address for my
> > >> question?
> > >>
> > >> Thanks,
> > >> Venu
> > >>
> > >>
> > >>> On Thu, Feb 24, 2022 at 6:47 AM Jaladi, Venumadhav <
> > >>> jaladi.venumad...@verizon.com> wrote:
> > >>>
> > >>> Hi team,
> > >>>
> > >>> We are using the Maven Dependency Plugin in one of our projects and our
> > >>> scanning tools are showing multiple vulnerabilities related to Log4j
> > >>> (CVE-2019-17571, CVE-2020-9488, CVE-2022-23302, CVE-2022-23305,
> > >>> CVE-2022-23307 and CVE-2021-4104).
> > >>>
> > >>> We would  like to know if there are any plans to release a newer
> > version
> > >>> of Maven Dependency Plugin with the fixes of these
> > >>> vulnerabilities(referring to the latest version of Log4j libraries).
> > If
> > >>> so, is there any planned date for this release?
> > >>>
> > >>> Please let us know any any more information is required.
> > >>>
> > >>> Thanks,
> > >>> Venu
> > >>>
> > >>
> > >
> > >
> > > --
> > > Sławomir Jaranowski
> >
> >
>
> --
>
> Best Regards
>
>
> --
>
> Juraj Veverka  | Solution Design Architect
>
> M +421 917 521 285
>
> www.globallogic.sk  
>
>    [image: GLTwitter]
> 
> 
> 
> 
>
> http://www.globallogic.com/Disclaimer.htm


Re: Maven Dependency Plugin - Log4j vulnerabilities

2022-02-28 Thread Juraj Veverka
Hi David

Many thanks for your email, I really appreciate your reply. This is an
isolated example of the problem.
https://github.com/jveverka/mvn-dependency-log4j
You can find all repro steps there. In case of any questions, feel free
to contact me.

Kind regards
Juraj Veverka



On Mon, Feb 28, 2022 at 12:14 PM David Milet  wrote:

> Where I work we decided to address log4j vulnerabilities only for
> components directly used by the application and actually performing logging.
> We ignored transitive dependencies and maven plug-ins.
> I’m curious about this use case from Venu though, what application would
> rely on the maven dependency plugin at runtime? Does it mean you’re pulling
> maven dependencies after application startup?
>
> > On Feb 28, 2022, at 03:30, Slawomir Jaranowski 
> wrote:
> >
> > Hi,
> >
> > Please provide more information, like plugin, mven, os version.
> >
> > We also need an example project which reproduces your issue.
> > When we can't reproduce we can't help.
> >
> > pon., 28 lut 2022 o 08:55 Jaladi, Venumadhav
> >  napisał(a):
> >
> >> Hi team,
> >>
> >> Can I expect any response?  Is this the right email address for my
> >> question?
> >>
> >> Thanks,
> >> Venu
> >>
> >>
> >>> On Thu, Feb 24, 2022 at 6:47 AM Jaladi, Venumadhav <
> >>> jaladi.venumad...@verizon.com> wrote:
> >>>
> >>> Hi team,
> >>>
> >>> We are using the Maven Dependency Plugin in one of our projects and our
> >>> scanning tools are showing multiple vulnerabilities related to Log4j
> >>> (CVE-2019-17571, CVE-2020-9488, CVE-2022-23302, CVE-2022-23305,
> >>> CVE-2022-23307 and CVE-2021-4104).
> >>>
> >>> We would  like to know if there are any plans to release a newer
> version
> >>> of Maven Dependency Plugin with the fixes of these
> >>> vulnerabilities(referring to the latest version of Log4j libraries).
> If
> >>> so, is there any planned date for this release?
> >>>
> >>> Please let us know any any more information is required.
> >>>
> >>> Thanks,
> >>> Venu
> >>>
> >>
> >
> >
> > --
> > Sławomir Jaranowski
>
>

-- 

Best Regards


--

Juraj Veverka  | Solution Design Architect

M +421 917 521 285

www.globallogic.sk  

   [image: GLTwitter]





http://www.globallogic.com/Disclaimer.htm


Re: Maven Dependency Plugin - Log4j vulnerabilities

2022-02-28 Thread David Milet
Where I work we decided to address log4j vulnerabilities only for components 
directly used by the application and actually performing logging.
We ignored transitive dependencies and maven plug-ins.
I’m curious about this use case from Venu though, what application would rely 
on the maven dependency plugin at runtime? Does it mean you’re pulling maven 
dependencies after application startup? 

> On Feb 28, 2022, at 03:30, Slawomir Jaranowski  wrote:
> 
> Hi,
> 
> Please provide more information, like plugin, mven, os version.
> 
> We also need an example project which reproduces your issue.
> When we can't reproduce we can't help.
> 
> pon., 28 lut 2022 o 08:55 Jaladi, Venumadhav
>  napisał(a):
> 
>> Hi team,
>> 
>> Can I expect any response?  Is this the right email address for my
>> question?
>> 
>> Thanks,
>> Venu
>> 
>> 
>>> On Thu, Feb 24, 2022 at 6:47 AM Jaladi, Venumadhav <
>>> jaladi.venumad...@verizon.com> wrote:
>>> 
>>> Hi team,
>>> 
>>> We are using the Maven Dependency Plugin in one of our projects and our
>>> scanning tools are showing multiple vulnerabilities related to Log4j
>>> (CVE-2019-17571, CVE-2020-9488, CVE-2022-23302, CVE-2022-23305,
>>> CVE-2022-23307 and CVE-2021-4104).
>>> 
>>> We would  like to know if there are any plans to release a newer version
>>> of Maven Dependency Plugin with the fixes of these
>>> vulnerabilities(referring to the latest version of Log4j libraries).  If
>>> so, is there any planned date for this release?
>>> 
>>> Please let us know any any more information is required.
>>> 
>>> Thanks,
>>> Venu
>>> 
>> 
> 
> 
> -- 
> Sławomir Jaranowski


Re: Maven Dependency Plugin - Log4j vulnerabilities

2022-02-28 Thread Slawomir Jaranowski
Hi,

Please provide more information, like plugin, mven, os version.

We also need an example project which reproduces your issue.
When we can't reproduce we can't help.

pon., 28 lut 2022 o 08:55 Jaladi, Venumadhav
 napisał(a):

> Hi team,
>
> Can I expect any response?  Is this the right email address for my
> question?
>
> Thanks,
> Venu
>
>
> On Thu, Feb 24, 2022 at 6:47 AM Jaladi, Venumadhav <
> jaladi.venumad...@verizon.com> wrote:
>
> > Hi team,
> >
> > We are using the Maven Dependency Plugin in one of our projects and our
> > scanning tools are showing multiple vulnerabilities related to Log4j
> > (CVE-2019-17571, CVE-2020-9488, CVE-2022-23302, CVE-2022-23305,
> > CVE-2022-23307 and CVE-2021-4104).
> >
> > We would  like to know if there are any plans to release a newer version
> > of Maven Dependency Plugin with the fixes of these
> > vulnerabilities(referring to the latest version of Log4j libraries).  If
> > so, is there any planned date for this release?
> >
> > Please let us know any any more information is required.
> >
> > Thanks,
> > Venu
> >
>


-- 
Sławomir Jaranowski


Re: Maven Dependency Plugin - Log4j vulnerabilities

2022-02-27 Thread Jaladi, Venumadhav
Hi team,

Can I expect any response?  Is this the right email address for my question?

Thanks,
Venu


On Thu, Feb 24, 2022 at 6:47 AM Jaladi, Venumadhav <
jaladi.venumad...@verizon.com> wrote:

> Hi team,
>
> We are using the Maven Dependency Plugin in one of our projects and our
> scanning tools are showing multiple vulnerabilities related to Log4j
> (CVE-2019-17571, CVE-2020-9488, CVE-2022-23302, CVE-2022-23305,
> CVE-2022-23307 and CVE-2021-4104).
>
> We would  like to know if there are any plans to release a newer version
> of Maven Dependency Plugin with the fixes of these
> vulnerabilities(referring to the latest version of Log4j libraries).  If
> so, is there any planned date for this release?
>
> Please let us know any any more information is required.
>
> Thanks,
> Venu
>