
コーダーズ・コンカー・セキュリティ OWASP トップ 10 API シリーズ-ブロークン・オブジェクト・レベル・オーソライゼーション
Threats to cybersecurity these days are ubiquitous and relentless. It's gotten so bad that trying to keep up with them after programs are deployed has become almost impossible. However, in this age of DevSecOps, continuous delivery, and more data paydirt than ever before, shrewd organizations are helping their developers upskill into security-aware superstars that assist in eliminating common vulnerabilities before they ever make it to production. We've addressed web vulnerabilities, plus our own Top 8 Infrastructure as Code bugs, and now it's time to get acquainted with the next big software security challenge. Are you ready?
This next series of blogs will focus on some of the worst security bugs as they relate to Application Programming Interfaces (APIs). These are so bad that they made the Open Web Application Security Project (OWASP) list of top API vulnerabilities. Given how important APIs are to modern computing infrastructures, these are critical problems that you need to keep out of your applications and programs at all costs.
A perfect example of why it's essential to use code to enforce security can be found in an examination of the broken object level authorization vulnerability. This happens when programmers fail to explicitly define which users are able to view objects and data, or provide any form of verification to view, change, or make other requests to manipulate or access objects, allowing them to modify and access objects and data through API endpoints. An API endpoint is a touchpoint, often an URL, that is utilized for communication between the API itself and another system. The ability for connectivity between apps has elevated some of the world's most beloved software, but it comes at the risk of exposing multiple endpoints if they are not air-tight.
It can also occur when coders forget or inherit properties from parent classes, without realizing that doing so also leaves out a critical verification process within their code. In general, object level authorization checks should be included for every function that accesses a data source using an input from the user.
Think you're already familiar with these, and can find, fix and eliminate an access control bug right now? Play the gamified challenge:
How did you fare? If you want to work on your score, keep reading!
What are some examples of broken object level authorization vulnerabilities?
Object level access control vulnerabilities allow attackers to take actions that they should not be allowed to do. This might be an action that should be reserved for administrators, like accessing or viewing sensitive data, or destroying records. In a highly secure environment, it might even mean preventing anyone from viewing records at all unless they are specifically authorized to do so.
You should keep all possible actions in mind when defining object level authorization. For example, in Java Spring API, an endpoint with a potential issue might look like this:
public boolean deleteOrder(Long id) {
Order order = orderRepository.getOne(id);
if (order == null) {
log.info("No found order");
return false;
}
User user = order.getUser();
orderRepository.delete(order);
log.info("Delete order for user {}", user.getId());
return true;
The API endpoint deletes orders by ID, but does not verify if this order has been made by the current logged-in user. This presents an opportunity for an attacker to exploit this loophole and delete the orders of other users.
For safe access restrictions to be properly implemented, the code would look more like this:
public boolean deleteOrder(Long id) {
User user = userService.getUserByContext();
boolean orderExist = getUserOrders().stream()
.anyMatch(order -> (order.getId() == id));
if (orderExist) {
orderRepository.deleteById(id);
log.info("Delete order for user {}", user.getId());
return true;
} else {
log.info("No found order");
return false;
Eliminating broken object level authorization vulnerabilities
The access control code does not need to be overly complicated. In the case of our Java Spring API environment example, it can be fixed by tightly defining who can access objects.
First, a verification process must be implemented in order to identify who is making the request:
User user = userService.getUserByContext();
Next, we must ensure the object id exists and belongs to the user making the request:
boolean orderExist = getUserOrders().stream()
.anyMatch(order -> (order.getId() == id));
And finally, we proceed to delete the object:
orderRepository.deleteById(id);
Keep in mind that you need to ensure that the authorization method in your code aligns with your organization's user policies and data access controls. As a way to ensure that your code is fully secure, you should carry out checks to verify that users with different permission levels have access to the data they need to perform their jobs, but are prevented from viewing or changing anything that should be restricted to them. Doing so might uncover missing object control vulnerabilities that have accidentally been overlooked.
The main takeaways from these examples are to first define every action that a user could take with an object, and then add strong access controls directly to the code. And finally, never trust the inherited parent properties to do that job or to delegate that authority elsewhere. Instead, define user permissions and actions in the code explicitly for every object type that you need to protect.
Check out the Secure Code Warrior blog pages for more insight about this vulnerability and how to protect your organization and customers from the ravages of other security flaws. You can also try a demo of the Secure Code Warrior training platform to keep all your cybersecurity skills honed and up-to-date.
マティアス・マドゥ博士は、セキュリティ専門家、研究者、CTO、セキュア・コード・ウォリアーの共同創設者です。Matias はゲント大学で静的分析ソリューションを中心にアプリケーションセキュリティの博士号を取得しました。その後、米国のFortifyに入社し、開発者が安全なコードを書くのを手伝わずに、コードの問題を検出するだけでは不十分であることに気づきました。これがきっかけで、開発者を支援し、セキュリティの負担を軽減し、顧客の期待を超える製品を開発するようになりました。Team Awesome の一員としてデスクにいないときは、RSA カンファレンス、BlackHat、DefCon などのカンファレンスでプレゼンテーションを行うステージでのプレゼンテーションを楽しんでいます。

Secure Code Warriorは、ソフトウェア開発ライフサイクル全体にわたってコードを保護し、サイバーセキュリティを最優先とする文化を築くお手伝いをします。アプリケーションセキュリティマネージャ、開発者、CISO、またはセキュリティ関係者のいずれであっても、安全でないコードに関連するリスクを軽減するお手伝いをします。
デモを予約マティアス・マドゥ博士は、セキュリティ専門家、研究者、CTO、セキュア・コード・ウォリアーの共同創設者です。Matias はゲント大学で静的分析ソリューションを中心にアプリケーションセキュリティの博士号を取得しました。その後、米国のFortifyに入社し、開発者が安全なコードを書くのを手伝わずに、コードの問題を検出するだけでは不十分であることに気づきました。これがきっかけで、開発者を支援し、セキュリティの負担を軽減し、顧客の期待を超える製品を開発するようになりました。Team Awesome の一員としてデスクにいないときは、RSA カンファレンス、BlackHat、DefCon などのカンファレンスでプレゼンテーションを行うステージでのプレゼンテーションを楽しんでいます。
Matiasは、15年以上のソフトウェアセキュリティの実務経験を持つ研究者および開発者です。フォーティファイ・ソフトウェアや自身の会社であるセンセイ・セキュリティなどの企業向けにソリューションを開発してきました。マティアスはキャリアを通じて、複数のアプリケーションセキュリティ研究プロジェクトを主導し、それが商用製品につながり、10件以上の特許を取得しています。デスクから離れているときには、マティアスは上級アプリケーション・セキュリティ・トレーニング・コースの講師を務め、RSA Conference、Black Hat、DefCon、BSIMM、OWASP AppSec、BruConなどのグローバルカンファレンスで定期的に講演を行っています。
マティアスはゲント大学でコンピューター工学の博士号を取得し、そこでアプリケーションの内部動作を隠すためのプログラムの難読化によるアプリケーションセキュリティを学びました。


Threats to cybersecurity these days are ubiquitous and relentless. It's gotten so bad that trying to keep up with them after programs are deployed has become almost impossible. However, in this age of DevSecOps, continuous delivery, and more data paydirt than ever before, shrewd organizations are helping their developers upskill into security-aware superstars that assist in eliminating common vulnerabilities before they ever make it to production. We've addressed web vulnerabilities, plus our own Top 8 Infrastructure as Code bugs, and now it's time to get acquainted with the next big software security challenge. Are you ready?
This next series of blogs will focus on some of the worst security bugs as they relate to Application Programming Interfaces (APIs). These are so bad that they made the Open Web Application Security Project (OWASP) list of top API vulnerabilities. Given how important APIs are to modern computing infrastructures, these are critical problems that you need to keep out of your applications and programs at all costs.
A perfect example of why it's essential to use code to enforce security can be found in an examination of the broken object level authorization vulnerability. This happens when programmers fail to explicitly define which users are able to view objects and data, or provide any form of verification to view, change, or make other requests to manipulate or access objects, allowing them to modify and access objects and data through API endpoints. An API endpoint is a touchpoint, often an URL, that is utilized for communication between the API itself and another system. The ability for connectivity between apps has elevated some of the world's most beloved software, but it comes at the risk of exposing multiple endpoints if they are not air-tight.
It can also occur when coders forget or inherit properties from parent classes, without realizing that doing so also leaves out a critical verification process within their code. In general, object level authorization checks should be included for every function that accesses a data source using an input from the user.
Think you're already familiar with these, and can find, fix and eliminate an access control bug right now? Play the gamified challenge:
How did you fare? If you want to work on your score, keep reading!
What are some examples of broken object level authorization vulnerabilities?
Object level access control vulnerabilities allow attackers to take actions that they should not be allowed to do. This might be an action that should be reserved for administrators, like accessing or viewing sensitive data, or destroying records. In a highly secure environment, it might even mean preventing anyone from viewing records at all unless they are specifically authorized to do so.
You should keep all possible actions in mind when defining object level authorization. For example, in Java Spring API, an endpoint with a potential issue might look like this:
public boolean deleteOrder(Long id) {
Order order = orderRepository.getOne(id);
if (order == null) {
log.info("No found order");
return false;
}
User user = order.getUser();
orderRepository.delete(order);
log.info("Delete order for user {}", user.getId());
return true;
The API endpoint deletes orders by ID, but does not verify if this order has been made by the current logged-in user. This presents an opportunity for an attacker to exploit this loophole and delete the orders of other users.
For safe access restrictions to be properly implemented, the code would look more like this:
public boolean deleteOrder(Long id) {
User user = userService.getUserByContext();
boolean orderExist = getUserOrders().stream()
.anyMatch(order -> (order.getId() == id));
if (orderExist) {
orderRepository.deleteById(id);
log.info("Delete order for user {}", user.getId());
return true;
} else {
log.info("No found order");
return false;
Eliminating broken object level authorization vulnerabilities
The access control code does not need to be overly complicated. In the case of our Java Spring API environment example, it can be fixed by tightly defining who can access objects.
First, a verification process must be implemented in order to identify who is making the request:
User user = userService.getUserByContext();
Next, we must ensure the object id exists and belongs to the user making the request:
boolean orderExist = getUserOrders().stream()
.anyMatch(order -> (order.getId() == id));
And finally, we proceed to delete the object:
orderRepository.deleteById(id);
Keep in mind that you need to ensure that the authorization method in your code aligns with your organization's user policies and data access controls. As a way to ensure that your code is fully secure, you should carry out checks to verify that users with different permission levels have access to the data they need to perform their jobs, but are prevented from viewing or changing anything that should be restricted to them. Doing so might uncover missing object control vulnerabilities that have accidentally been overlooked.
The main takeaways from these examples are to first define every action that a user could take with an object, and then add strong access controls directly to the code. And finally, never trust the inherited parent properties to do that job or to delegate that authority elsewhere. Instead, define user permissions and actions in the code explicitly for every object type that you need to protect.
Check out the Secure Code Warrior blog pages for more insight about this vulnerability and how to protect your organization and customers from the ravages of other security flaws. You can also try a demo of the Secure Code Warrior training platform to keep all your cybersecurity skills honed and up-to-date.

Threats to cybersecurity these days are ubiquitous and relentless. It's gotten so bad that trying to keep up with them after programs are deployed has become almost impossible. However, in this age of DevSecOps, continuous delivery, and more data paydirt than ever before, shrewd organizations are helping their developers upskill into security-aware superstars that assist in eliminating common vulnerabilities before they ever make it to production. We've addressed web vulnerabilities, plus our own Top 8 Infrastructure as Code bugs, and now it's time to get acquainted with the next big software security challenge. Are you ready?
This next series of blogs will focus on some of the worst security bugs as they relate to Application Programming Interfaces (APIs). These are so bad that they made the Open Web Application Security Project (OWASP) list of top API vulnerabilities. Given how important APIs are to modern computing infrastructures, these are critical problems that you need to keep out of your applications and programs at all costs.
A perfect example of why it's essential to use code to enforce security can be found in an examination of the broken object level authorization vulnerability. This happens when programmers fail to explicitly define which users are able to view objects and data, or provide any form of verification to view, change, or make other requests to manipulate or access objects, allowing them to modify and access objects and data through API endpoints. An API endpoint is a touchpoint, often an URL, that is utilized for communication between the API itself and another system. The ability for connectivity between apps has elevated some of the world's most beloved software, but it comes at the risk of exposing multiple endpoints if they are not air-tight.
It can also occur when coders forget or inherit properties from parent classes, without realizing that doing so also leaves out a critical verification process within their code. In general, object level authorization checks should be included for every function that accesses a data source using an input from the user.
Think you're already familiar with these, and can find, fix and eliminate an access control bug right now? Play the gamified challenge:
How did you fare? If you want to work on your score, keep reading!
What are some examples of broken object level authorization vulnerabilities?
Object level access control vulnerabilities allow attackers to take actions that they should not be allowed to do. This might be an action that should be reserved for administrators, like accessing or viewing sensitive data, or destroying records. In a highly secure environment, it might even mean preventing anyone from viewing records at all unless they are specifically authorized to do so.
You should keep all possible actions in mind when defining object level authorization. For example, in Java Spring API, an endpoint with a potential issue might look like this:
public boolean deleteOrder(Long id) {
Order order = orderRepository.getOne(id);
if (order == null) {
log.info("No found order");
return false;
}
User user = order.getUser();
orderRepository.delete(order);
log.info("Delete order for user {}", user.getId());
return true;
The API endpoint deletes orders by ID, but does not verify if this order has been made by the current logged-in user. This presents an opportunity for an attacker to exploit this loophole and delete the orders of other users.
For safe access restrictions to be properly implemented, the code would look more like this:
public boolean deleteOrder(Long id) {
User user = userService.getUserByContext();
boolean orderExist = getUserOrders().stream()
.anyMatch(order -> (order.getId() == id));
if (orderExist) {
orderRepository.deleteById(id);
log.info("Delete order for user {}", user.getId());
return true;
} else {
log.info("No found order");
return false;
Eliminating broken object level authorization vulnerabilities
The access control code does not need to be overly complicated. In the case of our Java Spring API environment example, it can be fixed by tightly defining who can access objects.
First, a verification process must be implemented in order to identify who is making the request:
User user = userService.getUserByContext();
Next, we must ensure the object id exists and belongs to the user making the request:
boolean orderExist = getUserOrders().stream()
.anyMatch(order -> (order.getId() == id));
And finally, we proceed to delete the object:
orderRepository.deleteById(id);
Keep in mind that you need to ensure that the authorization method in your code aligns with your organization's user policies and data access controls. As a way to ensure that your code is fully secure, you should carry out checks to verify that users with different permission levels have access to the data they need to perform their jobs, but are prevented from viewing or changing anything that should be restricted to them. Doing so might uncover missing object control vulnerabilities that have accidentally been overlooked.
The main takeaways from these examples are to first define every action that a user could take with an object, and then add strong access controls directly to the code. And finally, never trust the inherited parent properties to do that job or to delegate that authority elsewhere. Instead, define user permissions and actions in the code explicitly for every object type that you need to protect.
Check out the Secure Code Warrior blog pages for more insight about this vulnerability and how to protect your organization and customers from the ravages of other security flaws. You can also try a demo of the Secure Code Warrior training platform to keep all your cybersecurity skills honed and up-to-date.

以下のリンクをクリックして、このリソースのPDFをダウンロードしてください。
Secure Code Warriorは、ソフトウェア開発ライフサイクル全体にわたってコードを保護し、サイバーセキュリティを最優先とする文化を築くお手伝いをします。アプリケーションセキュリティマネージャ、開発者、CISO、またはセキュリティ関係者のいずれであっても、安全でないコードに関連するリスクを軽減するお手伝いをします。
レポートを表示デモを予約マティアス・マドゥ博士は、セキュリティ専門家、研究者、CTO、セキュア・コード・ウォリアーの共同創設者です。Matias はゲント大学で静的分析ソリューションを中心にアプリケーションセキュリティの博士号を取得しました。その後、米国のFortifyに入社し、開発者が安全なコードを書くのを手伝わずに、コードの問題を検出するだけでは不十分であることに気づきました。これがきっかけで、開発者を支援し、セキュリティの負担を軽減し、顧客の期待を超える製品を開発するようになりました。Team Awesome の一員としてデスクにいないときは、RSA カンファレンス、BlackHat、DefCon などのカンファレンスでプレゼンテーションを行うステージでのプレゼンテーションを楽しんでいます。
Matiasは、15年以上のソフトウェアセキュリティの実務経験を持つ研究者および開発者です。フォーティファイ・ソフトウェアや自身の会社であるセンセイ・セキュリティなどの企業向けにソリューションを開発してきました。マティアスはキャリアを通じて、複数のアプリケーションセキュリティ研究プロジェクトを主導し、それが商用製品につながり、10件以上の特許を取得しています。デスクから離れているときには、マティアスは上級アプリケーション・セキュリティ・トレーニング・コースの講師を務め、RSA Conference、Black Hat、DefCon、BSIMM、OWASP AppSec、BruConなどのグローバルカンファレンスで定期的に講演を行っています。
マティアスはゲント大学でコンピューター工学の博士号を取得し、そこでアプリケーションの内部動作を隠すためのプログラムの難読化によるアプリケーションセキュリティを学びました。
Threats to cybersecurity these days are ubiquitous and relentless. It's gotten so bad that trying to keep up with them after programs are deployed has become almost impossible. However, in this age of DevSecOps, continuous delivery, and more data paydirt than ever before, shrewd organizations are helping their developers upskill into security-aware superstars that assist in eliminating common vulnerabilities before they ever make it to production. We've addressed web vulnerabilities, plus our own Top 8 Infrastructure as Code bugs, and now it's time to get acquainted with the next big software security challenge. Are you ready?
This next series of blogs will focus on some of the worst security bugs as they relate to Application Programming Interfaces (APIs). These are so bad that they made the Open Web Application Security Project (OWASP) list of top API vulnerabilities. Given how important APIs are to modern computing infrastructures, these are critical problems that you need to keep out of your applications and programs at all costs.
A perfect example of why it's essential to use code to enforce security can be found in an examination of the broken object level authorization vulnerability. This happens when programmers fail to explicitly define which users are able to view objects and data, or provide any form of verification to view, change, or make other requests to manipulate or access objects, allowing them to modify and access objects and data through API endpoints. An API endpoint is a touchpoint, often an URL, that is utilized for communication between the API itself and another system. The ability for connectivity between apps has elevated some of the world's most beloved software, but it comes at the risk of exposing multiple endpoints if they are not air-tight.
It can also occur when coders forget or inherit properties from parent classes, without realizing that doing so also leaves out a critical verification process within their code. In general, object level authorization checks should be included for every function that accesses a data source using an input from the user.
Think you're already familiar with these, and can find, fix and eliminate an access control bug right now? Play the gamified challenge:
How did you fare? If you want to work on your score, keep reading!
What are some examples of broken object level authorization vulnerabilities?
Object level access control vulnerabilities allow attackers to take actions that they should not be allowed to do. This might be an action that should be reserved for administrators, like accessing or viewing sensitive data, or destroying records. In a highly secure environment, it might even mean preventing anyone from viewing records at all unless they are specifically authorized to do so.
You should keep all possible actions in mind when defining object level authorization. For example, in Java Spring API, an endpoint with a potential issue might look like this:
public boolean deleteOrder(Long id) {
Order order = orderRepository.getOne(id);
if (order == null) {
log.info("No found order");
return false;
}
User user = order.getUser();
orderRepository.delete(order);
log.info("Delete order for user {}", user.getId());
return true;
The API endpoint deletes orders by ID, but does not verify if this order has been made by the current logged-in user. This presents an opportunity for an attacker to exploit this loophole and delete the orders of other users.
For safe access restrictions to be properly implemented, the code would look more like this:
public boolean deleteOrder(Long id) {
User user = userService.getUserByContext();
boolean orderExist = getUserOrders().stream()
.anyMatch(order -> (order.getId() == id));
if (orderExist) {
orderRepository.deleteById(id);
log.info("Delete order for user {}", user.getId());
return true;
} else {
log.info("No found order");
return false;
Eliminating broken object level authorization vulnerabilities
The access control code does not need to be overly complicated. In the case of our Java Spring API environment example, it can be fixed by tightly defining who can access objects.
First, a verification process must be implemented in order to identify who is making the request:
User user = userService.getUserByContext();
Next, we must ensure the object id exists and belongs to the user making the request:
boolean orderExist = getUserOrders().stream()
.anyMatch(order -> (order.getId() == id));
And finally, we proceed to delete the object:
orderRepository.deleteById(id);
Keep in mind that you need to ensure that the authorization method in your code aligns with your organization's user policies and data access controls. As a way to ensure that your code is fully secure, you should carry out checks to verify that users with different permission levels have access to the data they need to perform their jobs, but are prevented from viewing or changing anything that should be restricted to them. Doing so might uncover missing object control vulnerabilities that have accidentally been overlooked.
The main takeaways from these examples are to first define every action that a user could take with an object, and then add strong access controls directly to the code. And finally, never trust the inherited parent properties to do that job or to delegate that authority elsewhere. Instead, define user permissions and actions in the code explicitly for every object type that you need to protect.
Check out the Secure Code Warrior blog pages for more insight about this vulnerability and how to protect your organization and customers from the ravages of other security flaws. You can also try a demo of the Secure Code Warrior training platform to keep all your cybersecurity skills honed and up-to-date.
目次
マティアス・マドゥ博士は、セキュリティ専門家、研究者、CTO、セキュア・コード・ウォリアーの共同創設者です。Matias はゲント大学で静的分析ソリューションを中心にアプリケーションセキュリティの博士号を取得しました。その後、米国のFortifyに入社し、開発者が安全なコードを書くのを手伝わずに、コードの問題を検出するだけでは不十分であることに気づきました。これがきっかけで、開発者を支援し、セキュリティの負担を軽減し、顧客の期待を超える製品を開発するようになりました。Team Awesome の一員としてデスクにいないときは、RSA カンファレンス、BlackHat、DefCon などのカンファレンスでプレゼンテーションを行うステージでのプレゼンテーションを楽しんでいます。

Secure Code Warriorは、ソフトウェア開発ライフサイクル全体にわたってコードを保護し、サイバーセキュリティを最優先とする文化を築くお手伝いをします。アプリケーションセキュリティマネージャ、開発者、CISO、またはセキュリティ関係者のいずれであっても、安全でないコードに関連するリスクを軽減するお手伝いをします。
デモを予約[ダウンロード]始めるためのリソース
Threat Modeling with AI: Turning Every Developer into a Threat Modeler
Walk away better equipped to help developers combine threat modeling ideas and techniques with the AI tools they're already using to strengthen security, improve collaboration, and build more resilient software from the start.




%20(1).avif)
.avif)
