Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of deprecated ion-java #3077

Closed
zdenda-online opened this issue Jan 11, 2024 · 19 comments
Closed

Use of deprecated ion-java #3077

zdenda-online opened this issue Jan 11, 2024 · 19 comments
Labels
bug This issue is a bug. p1 This is a high priority issue

Comments

@zdenda-online
Copy link

Describe the bug

In 2020 ion-java was migrated to different maven coordinates but unfortunately AWS SDK still uses the older one.

That itself wouldn't be a big deal. However, there are some security vulnerabilities reported to ion-java (e.g. CVE-2024-21634) with high+ CVSS. Having dependency on older ion-java makes fix of this vulnerability hard.

Expected Behavior

AWS SDKs use correct ion-java with group ID com.amazon.ion

Current Behavior

AWS SDKs use old ion-java group ID software.amazon.ion

Reproduction Steps

Run OWASP security check (no matter the tool) and see what CVEs from ion-java gets produced.

Possible Solution

Migrate to newer ion-java (currently 1.11.0) that have security issues resolved (it is also better for future patches).

Additional Information/Context

No response

AWS Java SDK version used

1.12.634

JDK version used

any

Operating System and version

any

@zdenda-online zdenda-online added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 11, 2024
@berry120
Copy link

Just to add to this - we're facing the same issue with the CodeGuru Java Profiler Agent which I don't think is set up to use the core SDK - it's using a version of 1.5.2 which also has the CVE that we're trying to get rid of.

@debora-ito
Copy link
Member

Acknowledged the CVE. We'll review #2969.

@berry120 we are not the maintainers of 'codeguru-profiler-java-agent', I'll reach out to the team that maintains it.

@debora-ito debora-ito added p1 This is a high priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Jan 11, 2024
@berry120
Copy link

@debora-ito Appreciate it, thank you! Is there another repository I should open an issue on to keep in touch with the correct team?

@debora-ito
Copy link
Member

I couldn't find one after a quick search. But I opened an internal ticket, I'll update here when I hear back from them.

@berry120
Copy link

@debora-ito Thank you very much!

@cedricmillet
Copy link

+1

@baldram
Copy link

baldram commented Jan 15, 2024

I couldn't find one after a quick search. But I opened an internal ticket, I'll update here when I hear back from them.

Thank you @debora-ito. Since the CVE is classified as high severity, any information regarding the current status would be greatly appreciated. This is important even if a prolonged wait for a resolution from the aforementioned team is expected. Knowing this will help us determine if there is a need for potential workarounds, such as forcing a version for a transitive dependency.

@codingtim
Copy link

Forcing the transitive dependency version will not help as the v1.0.2 uses packages under software.amazon.ion
the new version with the fix uses com.amazon.ion as package. So the 2 versions are incompatible.
Perhaps it is possible to exclude the dependency if it is unused? I am not really sure where in the sdk this library is used.

@baldram
Copy link

baldram commented Jan 17, 2024

Perhaps it is possible to exclude the dependency if it is unused?

Thank you @codingtim for clarification and great hint! Actually, it's theoretically possible. I come from Scala world and with SBT it's like this: https://www.baeldung.com/scala/sbt-exclude-dependencies#exclude-dependencies-from-all-dependencies, while with Maven it should be similar I guess.

I am not really sure where in the sdk this library is used.

This is indeed a good question. I would prefer to steer clear of any "hacking" approaches and the associated risks, as forcing excluding could potentially lead to further complications. However, continuing to operate with a "high" vulnerability is also undesirable. It would be beneficial to ascertain the expected timeframe for the resolution of this issue (cc: @debora-ito). If we are aware that the solution will not be forthcoming in the near future, this understanding would suggest that we should proceed with implementing a workaround.

@jeffalder
Copy link

I am not really sure where in the sdk this library is used

@codingtim @baldram #2969 this PR removes Ion entirely, so that should list all the locations.

The problem is that the coordinates (group and artifact) changed ... and the class package names changed. So as far as Java is concerned, com.amazon.ion and software.amazon.ion are completely unrelated.

I might explore just excluding the dependency. Unfortunately, the way the class name is specified in the code, class loading related JSON modules may fail.

@baldram
Copy link

baldram commented Jan 17, 2024

this PR removes Ion entirely, so that should list all the locations.

Yep, unfortunately AWS's communication on this matter is quite sparse. @zdenda-online inquired about the ETA for the merge, but received no response. But let's wait for the developments.

@jeffalder
Copy link

let's wait for the developments

Indeed. However, I'm going to start working towards replacing the AWS SDK v1 with v2, which doesn't use the vulnerable library... and is the recommended path regardless.

@davidh44
Copy link
Contributor

Ion has been removed from Java v1

Copy link

COMMENT VISIBILITY WARNING

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@rogierslag
Copy link

Ion has been removed from Java v1

Thanks! Will there shortly be a release 1.12.639 where the dependency is removed?

@davidh44
Copy link
Contributor

Thanks! Will there shortly be a release 1.12.639 where the dependency is removed?

The dependency was removed as part of the 1.12.638 release

julianladisch added a commit to folio-org/edge-api-utils that referenced this issue Jan 24, 2024
…arter-web

https://issues.folio.org/browse/EDGAPIUTL-17

Upgrade aws-java-sdk from 1.12.341 to 1.12.638. This removes the dependency and usage of software.amazon.ion:ion-java@1.0.2 that has an Allocation of Resources Without Limits or Throttling vulnerability:

* https://nvd.nist.gov/vuln/detail/CVE-2024-21634
* aws/aws-sdk-java#3077 (comment)

Upgrade spring-boot-starter-web from 3.1.1 to 3.1.8.

The spring-boot-starter-web upgrade indirectly upgrades spring-web from 6.0.10 to 6.0.16 fixing Denial of Service (DoS):

* https://nvd.nist.gov/vuln/detail/CVE-2023-34053

The spring-boot-starter-web upgrade indirectly upgrades tomcat-embed-core from 10.1.10 to 10.1.18 fixing multiple vulnerabilities:

* Denial of Service (DoS): https://nvd.nist.gov/vuln/detail/CVE-2023-44487
* HTTP request smuggling: https://nvd.nist.gov/vuln/detail/CVE-2023-46589
* Access Restriction Bypass: https://nvd.nist.gov/vuln/detail/CVE-2023-41080
* HTTP request smuggling: https://nvd.nist.gov/vuln/detail/CVE-2023-45648
* Incomplete Cleanup: https://nvd.nist.gov/vuln/detail/CVE-2023-42795

Upgrade folio-spring-base from 7.2.0 to 7.2.2 to match the spring-boot-starter-web upgrade.
@baldram
Copy link

baldram commented Jan 25, 2024

I'm going to start working towards replacing the AWS SDK v1 with v2, which doesn't use the vulnerable library... and is the recommended path regardless.

This is very sound advice and the right approach. However, there is a case where SDK V2 still uses dependencies from V1. 😞 Therefore, until the release of V3, we must maintain the deprecated dependency and respond to vulnerabilities like this one. (aws/aws-xray-sdk-java#92).

Thank you to the AWS team for their response and for issuing the fix.

julianladisch added a commit to folio-org/edge-common that referenced this issue Jan 27, 2024
https://issues.folio.org/browse/EDGCOMMON-74

Upgrade aws-java-sdk-ssm from 1.12.562 to 1.12.645.
This removes the dependency and usage of software.amazon.ion:ion-java@1.0.2
that has an Allocation of Resources Without Limits or Throttling vulnerability:

https://nvd.nist.gov/vuln/detail/CVE-2024-21634
aws/aws-sdk-java#3077 (comment)
@debora-ito
Copy link
Member

@berry120 just got an update from the CodeGuru Profiler team, they released a new version that upgraded ion-java to 1.11.1.

Please upgrade to codeguru-profiler-java-agent to 1.2.3.

@berry120
Copy link

berry120 commented Feb 7, 2024

@debora-ito Thanks very much!

julianladisch added a commit to folio-org/edge-api-utils that referenced this issue Mar 21, 2024
…arter-web

https://issues.folio.org/browse/EDGAPIUTL-17

Upgrade aws-java-sdk from 1.12.341 to 1.12.638. This removes the dependency and usage of software.amazon.ion:ion-java@1.0.2 that has an Allocation of Resources Without Limits or Throttling vulnerability:

* https://nvd.nist.gov/vuln/detail/CVE-2024-21634
* aws/aws-sdk-java#3077 (comment)

Upgrade spring-boot-starter-web from 3.1.1 to 3.1.8.

The spring-boot-starter-web upgrade indirectly upgrades spring-web from 6.0.10 to 6.0.16 fixing Denial of Service (DoS):

* https://nvd.nist.gov/vuln/detail/CVE-2023-34053

The spring-boot-starter-web upgrade indirectly upgrades tomcat-embed-core from 10.1.10 to 10.1.18 fixing multiple vulnerabilities:

* Denial of Service (DoS): https://nvd.nist.gov/vuln/detail/CVE-2023-44487
* HTTP request smuggling: https://nvd.nist.gov/vuln/detail/CVE-2023-46589
* Access Restriction Bypass: https://nvd.nist.gov/vuln/detail/CVE-2023-41080
* HTTP request smuggling: https://nvd.nist.gov/vuln/detail/CVE-2023-45648
* Incomplete Cleanup: https://nvd.nist.gov/vuln/detail/CVE-2023-42795

Upgrade folio-spring-base from 7.2.0 to 7.2.2 to match the spring-boot-starter-web upgrade.

(cherry picked from commit 4383e52)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p1 This is a high priority issue
Projects
None yet
Development

No branches or pull requests

9 participants