Skip to content

Upgrade MyBatis 3.2.5 → 3.5.16 (deserialization vulnerability)#162

Merged
vharseko merged 2 commits intomasterfrom
copilot/update-mybatis-to-3-5-16
Apr 17, 2026
Merged

Upgrade MyBatis 3.2.5 → 3.5.16 (deserialization vulnerability)#162
vharseko merged 2 commits intomasterfrom
copilot/update-mybatis-to-3-5-16

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 17, 2026

MyBatis 3.2.5 (pulled transitively via activiti-engine:5.15) contains a known deserialization vulnerability patched in 3.5.6. Upgrading to 3.5.16 resolves it.

Changes

  • pom.xml: Added <mybatis.version>3.5.16</mybatis.version> property and an explicit dependencyManagement entry to force the version override over Activiti's transitive dependency:
    <dependency>
        <groupId>org.mybatis</groupId>
        <artifactId>mybatis</artifactId>
        <version>${mybatis.version}</version>
    </dependency>
  • legal/THIRDPARTYREADME.txt: Updated jar entry from mybatis-3.2.5.jar to mybatis-3.5.16.jar with corrected copyright year.
Original prompt

The project currently uses MyBatis 3.2.5 (from 2013), which is severely outdated and contains known security vulnerabilities.

What needs to be done:

  1. Find all Maven POM files that declare the MyBatis dependency (version 3.2.5) and update the version to 3.5.16.
  2. Update legal/THIRDPARTYREADME.txt — change the entry mybatis-3.2.5.jar to mybatis-3.5.16.jar.
  3. If there is a property like <mybatis.version> in any parent or root pom.xml, update it there.

Context: While investigating CVE-2023-25330 (which targets MyBatis-Plus TenantPlugin, not base MyBatis), we discovered the project uses a very old MyBatis version. Upgrading to 3.5.16 addresses multiple security fixes and improvements accumulated over the years in the MyBatis project.

Important: Ensure the upgrade doesn't break compilation — MyBatis 3.5.x is largely backward-compatible with 3.2.x but some deprecated APIs may have been removed. Check for any breaking import changes if evident.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: предложи исправление CVE-2023-25330

Assistant: Репозиторий OpenIdentityPlatform/OpenIDM использует MyBatis 3.2.5 (не MyBatis-Plus), а CVE-2023-25330 относится конкретно к компоненту TenantPlugin библиотеки MyBatis-Plus (отдельный проект от MyBatis).

Вывод

CVE-2023-25330 не применима напрямую к этому репозиторию, поскольку:

  1. В проекте используется mybatis-3.2.5.jar (базовый MyBatis), а не MyBatis-Plus.
  2. CVE-2023-25330 — это SQL-инъекция в компоненте TenantPlugin, который существует только в MyBatis-Plus (пакет com.baomidou).
  3. Поиск по коду не выявил никаких следов mybatis-plus или TenantPlugin в репозитории.

Тем не менее, если вы хотите улучшить безопасность

Версия MyBatis 3.2.5 очень старая (2013 г.) и содержит другие известные уязвимости. Рекомендуемое исправление:

Обновить MyBatis до актуальной версии (3.5.16+). Для этого нужно найти зависимость в POM-файлах и обновить её:

<!-- Было: -->
<mybatis.version>3.2.5</mybatis.version>

<!-- Стало: -->
<mybatis.version>3.5.16</mybatis.version>

Хотите, чтобы я нашёл точный файл pom.xml с объявлением версии MyBatis и создал PR с обновлением?

User: make PR

Assistant: I've started the process of creating a pull request in OpenIdentityPlatform/OpenIDM to upgrade MyBatis from 3.2.5 to 3.5.16. The coding agent is now working on locating the relevant POM files and THIRDPARTYREADME.txt to make the necessary changes. You'll receive a notification when the PR is ready for review.

This pull request was created from Copilot chat.

Copilot AI changed the title [WIP] Update MyBatis dependency from 3.2.5 to 3.5.16 Upgrade MyBatis 3.2.5 → 3.5.16 (deserialization vulnerability) Apr 17, 2026
Copilot AI requested a review from vharseko April 17, 2026 09:18
@vharseko vharseko requested review from maximthomas and removed request for vharseko April 17, 2026 10:23
@vharseko vharseko marked this pull request as ready for review April 17, 2026 10:23
@vharseko vharseko merged commit 615ef0f into master Apr 17, 2026
14 checks passed
@vharseko vharseko deleted the copilot/update-mybatis-to-3-5-16 branch April 17, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants