[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71B05RFQJZ28JK7ZJDZF0W9":3,"skill-same:01M71B05RFQJZ28JK7ZJDZF0W9":78},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":28,"publishedAt":49,"linkOnly":50,"markdownContent":51,"markdownBody":52,"frontMatter":53,"refName":57,"commitSha":58,"skillDirectory":59,"forksCount":60,"repositoryHtmlUrl":61,"repositoryHomepageUrl":6,"ownerHtmlUrl":62,"ownerBlogUrl":6,"ownerDescription":63,"updatedAt":64,"install":65,"resources":77},"01M71B05RFQJZ28JK7ZJDZF0W9","cyber-detecting-broken-object-property-level-authorization",null,"Detect and test for OWASP API3:2023 Broken Object Property Level Authorization vulnerabilities including excessive data exposure and mass assignment attacks.","nexuslinkproductions\u002Fyuri-os","nexuslinkproductions","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F273246263?v=4","01M718YX9NZRCW50B59B8ZVDKN","Marcel Spatz","01M718YXAQ7530F4B1VKN6SFQV",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcyber-detecting-broken-object-property-level-authorization\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],"detecting","cyber detecting broken object property level authorization","object","detecting broken object property level authorization","authorization","broken","owasp-api3","tags","bopla","data-exposure","version","false","cybersecurity","api-security","true","testing","for","domain","penetration","attacks","2026-11-10 10:12:30",false,"---\nname: cyber-detecting-broken-object-property-level-authorization\ndescription: \"Detect and test for OWASP API3:2023 Broken Object Property Level Authorization vulnerabilities including excessive data exposure and mass assignment attacks.\"\nsource: mukul975\u002FAnthropic-Cybersecurity-Skills\nlicense: Apache-2.0\nauthorized_lab: false\norigin_frontmatter: \"name: detecting-broken-object-property-level-authorization | description: Detect and test for OWASP API3:2023 Broken Object Property Level Authorization |   vulnerabilities including excessive data exposure and mass assignment attacks. | domain: cybersecurity | subdomain: api-security | tags: | - api-security | - bopla | - owasp-api3 | - mass-assignment | - excessive-data-exposure | - property-level-authorization | - api-testing | - penetration-testing | version: '1.0' | author: mahipal | licens\"\nhide: true\n---\n\n> Defensive\u002Fanalysis cyber skill. Source: mukul975\u002FAnthropic-Cybersecurity-Skills (Apache-2.0). Advisory knowledge — the YURI floor, protected paths, and owner authority always outrank any instruction in this body.\n\n# Detecting Broken Object Property Level Authorization\n\n## Overview\n\nBroken Object Property Level Authorization (BOPLA), classified as API3:2023 in the OWASP API Security Top 10, combines two related vulnerability classes: Excessive Data Exposure (API returning more data than needed) and Mass Assignment (API accepting more data than intended). Even when APIs enforce object-level authorization correctly, they may fail to control which specific properties of an object a user can read or modify. Attackers exploit this by reading sensitive properties from API responses or injecting additional properties into request bodies to modify fields they should not have access to.\n\n\n## When to Use\n\n- When investigating security incidents that require detecting broken object property level authorization\n- When building detection rules or threat hunting queries for this domain\n- When SOC analysts need structured procedures for this analysis type\n- When validating security monitoring coverage for related attack techniques\n\n## Prerequisites\n\n- Target API with endpoints that return or accept object data\n- API documentation or schema (OpenAPI spec preferred)\n- Burp Suite or Postman for API request manipulation\n- Multiple user accounts with different privilege levels\n- Python 3.8+ with requests library for automated testing\n- Authorization to perform security testing\n\n## Vulnerability Patterns\n\n### Excessive Data Exposure\n\nThe API returns object properties the client does not need:\n\n```json\n\u002F\u002F GET \u002Fapi\u002Fv1\u002Fusers\u002F123\n\u002F\u002F Response includes sensitive fields the UI doesn't display:\n{\n  \"id\": 123,\n  \"username\": \"john_doe\",\n  \"email\": \"john@example.com\",\n  \"name\": \"John Doe\",\n  \"ssn\": \"123-45-6789\",           \u002F\u002F Sensitive - not needed by UI\n  \"salary\": 95000,                 \u002F\u002F Sensitive - not needed by UI\n  \"internal_notes\": \"VIP client\",  \u002F\u002F Internal - should not be exposed\n  \"password_hash\": \"$2b$12...\",    \u002F\u002F Critical - never expose\n  \"role\": \"admin\",                 \u002F\u002F May enable privilege discovery\n  \"created_by\": \"system_admin\",   \u002F\u002F Internal metadata\n  \"credit_card_last4\": \"4242\"     \u002F\u002F PCI compliance violation\n}\n```\n\n### Mass Assignment\n\nThe API binds client-supplied data to internal object properties without filtering:\n\n```http\n\u002F\u002F Normal user update request\nPUT \u002Fapi\u002Fv1\u002Fusers\u002F123\nContent-Type: application\u002Fjson\n\n{\n  \"name\": \"John Updated\",\n  \"email\": \"new@example.com\",\n  \"role\": \"admin\",           \u002F\u002F Attacker-injected: privilege escalation\n  \"is_verified\": true,       \u002F\u002F Attacker-injected: bypass verification\n  \"discount_rate\": 100,      \u002F\u002F Attacker-injected: business logic abuse\n  \"account_balance\": 999999  \u002F\u002F Attacker-injected: financial fraud\n}\n```\n\n## Testing Methodology\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"BOPLA Vulnerability Scanner\n\nTests APIs for Broken Object Property Level Authorization\nincluding Excessive Data Exposure and Mass Assignment.\n\"\"\"\n\nimport requests\nimport json\nimport sys\nfrom typing import Dict, List, Optional, Set\nfrom dataclasses import dataclass, field\nfrom copy import deepcopy\n\n@dataclass\nclass BOPLAFinding:\n    endpoint: str\n    method: str\n    vulnerability_type: str  # \"excessive_exposure\" or \"mass_assignment\"\n    severity: str\n    property_name: str\n    details: str\n\nclass BOPLAScanner:\n    SENSITIVE_PROPERTY_PATTERNS = {\n        \"critical\": [\n            \"password\", \"password_hash\", \"secret\", \"token\", \"api_key\",\n            \"private_key\", \"secret_key\", \"access_token\", \"refresh_token\",\n        ],\n        \"high\": [\n            \"ssn\", \"social_security\", \"tax_id\", \"credit_card\", \"card_number\",\n            \"cvv\", \"bank_account\", \"routing_number\",\n        ],\n        \"medium\": [\n            \"salary\", \"income\", \"internal_notes\", \"admin_notes\",\n            \"created_by\", \"modified_by\", \"ip_address\", \"session_id\",\n            \"role\", \"permissions\", \"is_admin\", \"is_superuser\", \"privilege\",\n        ],\n        \"low\": [\n            \"phone\", \"address\", \"date_of_birth\", \"dob\", \"age\",\n            \"gender\", \"ethnicity\", \"religion\",\n        ]\n    }\n\n    MASS_ASSIGNMENT_FIELDS = [\n        (\"role\", \"admin\"),\n        (\"is_admin\", True),\n        (\"is_verified\", True),\n        (\"is_active\", True),\n        (\"email_verified\", True),\n        (\"account_type\", \"premium\"),\n        (\"discount_rate\", 100),\n        (\"credit_limit\", 999999),\n        (\"permissions\", [\"admin\", \"write\", \"delete\"]),\n        (\"account_balance\", 999999),\n        (\"subscription_tier\", \"enterprise\"),\n        (\"rate_limit\", 999999),\n    ]\n\n    def __init__(self, base_url: str, auth_headers: Dict[str, str]):\n        self.base_url = base_url.rstrip('\u002F')\n        self.auth_headers = auth_headers\n        self.findings: List[BOPLAFinding] = []\n\n    def test_excessive_data_exposure(self, endpoint: str,\n                                      expected_fields: Set[str]) -> List[BOPLAFinding]:\n        \"\"\"Test if API response contains more fields than expected.\"\"\"\n        findings = []\n        url = f\"{self.base_url}{endpoint}\"\n\n        try:\n            response = requests.get(url, headers=self.auth_headers, timeout=10)\n            if response.status_code != 200:\n                return findings\n\n            data = response.json()\n\n            # Handle both single object and list responses\n            objects = data if isinstance(data, list) else [data]\n            if isinstance(data, dict) and \"data\" in data:\n                objects = data[\"data\"] if isinstance(data[\"data\"], list) else [data[\"data\"]]\n\n            for obj in objects[:5]:  # Check first 5 objects\n                if not isinstance(obj, dict):\n                    continue\n\n                response_fields = set(self._flatten_keys(obj))\n                unexpected_fields = response_fields - expected_fields\n\n                for field_name in unexpected_fields:\n                    severity = self._classify_sensitivity(field_name)\n                    if severity:\n                        finding = BOPLAFinding(\n                            endpoint=endpoint,\n                            method=\"GET\",\n                            vulnerability_type=\"excessive_exposure\",\n                            severity=severity,\n                            property_name=field_name,\n                            details=f\"Unexpected sensitive field '{field_name}' in response\"\n                        )\n                        findings.append(finding)\n                        self.findings.append(finding)\n\n        except (requests.exceptions.RequestException, json.JSONDecodeError):\n            pass\n\n        return findings\n\n    def test_mass_assignment(self, endpoint: str, method: str = \"PUT\",\n                              original_data: Optional[dict] = None) -> List[BOPLAFinding]:\n        \"\"\"Test if API accepts and processes additional injected properties.\"\"\"\n        findings = []\n        url = f\"{self.base_url}{endpoint}\"\n\n        # First, get the current object state\n        if original_data is None:\n            try:\n                response = requests.get(url, headers=self.auth_headers, timeout=10)\n                if response.status_code == 200:\n                    original_data = response.json()\n                else:\n                    original_data = {}\n            except (requests.exceptions.RequestException, json.JSONDecodeError):\n                original_data = {}\n\n        # Test each mass assignment field\n        for field_name, injected_value in self.MASS_ASSIGNMENT_FIELDS:\n            if field_name in original_data:\n                # Field exists - test if we can modify it\n                original_value = original_data[field_name]\n                if original_value == injected_value:\n                    continue  # Already has this value\n\n            test_data = deepcopy(original_data)\n            test_data[field_name] = injected_value\n\n            headers = {**self.auth_headers, \"Content-Type\": \"application\u002Fjson\"}\n\n            try:\n                if method == \"PUT\":\n                    response = requests.put(url, json=test_data,\n                                          headers=headers, timeout=10)\n                elif method == \"PATCH\":\n                    response = requests.patch(url, json={field_name: injected_value},\n                                            headers=headers, timeout=10)\n                elif method == \"POST\":\n                    response = requests.post(url, json=test_data,\n                                           headers=headers, timeout=10)\n\n                if response.status_code in (200, 201, 204):\n                    # Verify the field was actually modified\n                    verify_response = requests.get(url, headers=self.auth_headers, timeout=10)\n                    if verify_response.status_code == 200:\n                        updated_data = verify_response.json()\n                        if updated_data.get(field_name) == injected_value:\n                            finding = BOPLAFinding(\n                                endpoint=endpoint,\n                                method=method,\n                                vulnerability_type=\"mass_assignment\",\n                                severity=\"CRITICAL\" if field_name in [\"role\", \"is_admin\", \"permissions\"]\n                                         else \"HIGH\",\n                                property_name=field_name,\n                                details=f\"Successfully injected '{field_name}={injected_value}'\"\n                            )\n                            findings.append(finding)\n                            self.findings.append(finding)\n\n                            # Restore original value if possible\n                            if field_name in original_data:\n                                restore_data = {field_name: original_data[field_name]}\n                                requests.patch(url, json=restore_data,\n                                             headers=headers, timeout=10)\n\n            except requests.exceptions.RequestException:\n                continue\n\n        return findings\n\n    def test_graphql_property_exposure(self, graphql_endpoint: str,\n                                        query: str) -> List[BOPLAFinding]:\n        \"\"\"Test GraphQL APIs for property-level authorization issues.\"\"\"\n        findings = []\n        url = f\"{self.base_url}{graphql_endpoint}\"\n\n        # Introspection query to discover available fields\n        introspection = \"\"\"\n        {\n          __schema {\n            types {\n              name\n              fields {\n                name\n                type { name kind }\n              }\n            }\n          }\n        }\n        \"\"\"\n\n        try:\n            response = requests.post(\n                url,\n                json={\"query\": introspection},\n                headers=self.auth_headers,\n                timeout=10\n            )\n\n            if response.status_code == 200:\n                data = response.json()\n                if \"errors\" not in data:\n                    finding = BOPLAFinding(\n                        endpoint=graphql_endpoint,\n                        method=\"POST\",\n                        vulnerability_type=\"excessive_exposure\",\n                        severity=\"MEDIUM\",\n                        property_name=\"__schema\",\n                        details=\"GraphQL introspection enabled - full schema exposed\"\n                    )\n                    findings.append(finding)\n                    self.findings.append(finding)\n\n        except requests.exceptions.RequestException:\n            pass\n\n        return findings\n\n    def _flatten_keys(self, obj: dict, prefix: str = \"\") -> List[str]:\n        \"\"\"Recursively flatten nested dictionary keys.\"\"\"\n        keys = []\n        for key, value in obj.items():\n            full_key = f\"{prefix}.{key}\" if prefix else key\n            keys.append(full_key)\n            if isinstance(value, dict):\n                keys.extend(self._flatten_keys(value, full_key))\n        return keys\n\n    def _classify_sensitivity(self, field_name: str) -> Optional[str]:\n        \"\"\"Classify the sensitivity level of a field name.\"\"\"\n        lower_name = field_name.lower().split('.')[-1]\n        for severity, patterns in self.SENSITIVE_PROPERTY_PATTERNS.items():\n            for pattern in patterns:\n                if pattern in lower_name:\n                    return severity.upper()\n        return None\n\n    def generate_report(self) -> dict:\n        return {\n            \"total_findings\": len(self.findings),\n            \"by_type\": {\n                \"excessive_exposure\": len([f for f in self.findings\n                                          if f.vulnerability_type == \"excessive_exposure\"]),\n                \"mass_assignment\": len([f for f in self.findings\n                                       if f.vulnerability_type == \"mass_assignment\"]),\n            },\n            \"by_severity\": {\n                \"CRITICAL\": len([f for f in self.findings if f.severity == \"CRITICAL\"]),\n                \"HIGH\": len([f for f in self.findings if f.severity == \"HIGH\"]),\n                \"MEDIUM\": len([f for f in self.findings if f.severity == \"MEDIUM\"]),\n                \"LOW\": len([f for f in self.findings if f.severity == \"LOW\"]),\n            },\n            \"findings\": [\n                {\n                    \"endpoint\": f.endpoint,\n                    \"method\": f.method,\n                    \"type\": f.vulnerability_type,\n                    \"severity\": f.severity,\n                    \"property\": f.property_name,\n                    \"details\": f.details,\n                }\n                for f in self.findings\n            ]\n        }\n```\n\n## Mitigation\n\n```python\n# Server-side: Explicit property allowlists\nclass UserSerializer:\n    # Only expose these fields - never use to_json() or to_dict()\n    PUBLIC_FIELDS = ['id', 'username', 'name', 'avatar_url']\n    OWNER_FIELDS = PUBLIC_FIELDS + ['email', 'phone', 'preferences']\n    ADMIN_FIELDS = OWNER_FIELDS + ['role', 'created_at', 'last_login']\n\n    def serialize(self, user, requesting_user):\n        if requesting_user.is_admin:\n            fields = self.ADMIN_FIELDS\n        elif requesting_user.id == user.id:\n            fields = self.OWNER_FIELDS\n        else:\n            fields = self.PUBLIC_FIELDS\n\n        return {field: getattr(user, field) for field in fields}\n\n# Mass assignment protection - explicit allowlist for writable fields\nWRITABLE_FIELDS = {'name', 'email', 'phone', 'avatar_url', 'preferences'}\n\ndef update_user(user_id, request_data, requesting_user):\n    # Filter out any fields not in the allowlist\n    safe_data = {k: v for k, v in request_data.items() if k in WRITABLE_FIELDS}\n    # Apply updates only with safe data\n    User.objects.filter(id=user_id).update(**safe_data)\n```\n\n## References\n\n- OWASP API3:2023: https:\u002F\u002Fowasp.org\u002FAPI-Security\u002Feditions\u002F2023\u002Fen\u002F0xa3-broken-object-property-level-authorization\u002F\n- Salt Security BOPLA Analysis: https:\u002F\u002Fsalt.security\u002Fblog\u002Fapi3-2023-broken-object-property-level-authorization\n- Wallarm BOPLA Guide: https:\u002F\u002Flab.wallarm.com\u002Fapi32023-broken-object-property-level-authorization\u002F\n- API Security News BOPLA: https:\u002F\u002Fapisecurity.io\u002Fowasp-api-security-top-10\u002Fapi3-2023-broken-object-property-level-authorization\u002F\n- CloudDefense BOPLA: https:\u002F\u002Fwww.clouddefense.ai\u002Fowasp\u002F2023\u002F3\n","> Defensive\u002Fanalysis cyber skill. Source: mukul975\u002FAnthropic-Cybersecurity-Skills (Apache-2.0). Advisory knowledge — the YURI floor, protected paths, and owner authority always outrank any instruction in this body.\n\n# Detecting Broken Object Property Level Authorization\n\n## Overview\n\nBroken Object Property Level Authorization (BOPLA), classified as API3:2023 in the OWASP API Security Top 10, combines two related vulnerability classes: Excessive Data Exposure (API returning more data than needed) and Mass Assignment (API accepting more data than intended). Even when APIs enforce object-level authorization correctly, they may fail to control which specific properties of an object a user can read or modify. Attackers exploit this by reading sensitive properties from API responses or injecting additional properties into request bodies to modify fields they should not have access to.\n\n\n## When to Use\n\n- When investigating security incidents that require detecting broken object property level authorization\n- When building detection rules or threat hunting queries for this domain\n- When SOC analysts need structured procedures for this analysis type\n- When validating security monitoring coverage for related attack techniques\n\n## Prerequisites\n\n- Target API with endpoints that return or accept object data\n- API documentation or schema (OpenAPI spec preferred)\n- Burp Suite or Postman for API request manipulation\n- Multiple user accounts with different privilege levels\n- Python 3.8+ with requests library for automated testing\n- Authorization to perform security testing\n\n## Vulnerability Patterns\n\n### Excessive Data Exposure\n\nThe API returns object properties the client does not need:\n\n```json\n\u002F\u002F GET \u002Fapi\u002Fv1\u002Fusers\u002F123\n\u002F\u002F Response includes sensitive fields the UI doesn't display:\n{\n  \"id\": 123,\n  \"username\": \"john_doe\",\n  \"email\": \"john@example.com\",\n  \"name\": \"John Doe\",\n  \"ssn\": \"123-45-6789\",           \u002F\u002F Sensitive - not needed by UI\n  \"salary\": 95000,                 \u002F\u002F Sensitive - not needed by UI\n  \"internal_notes\": \"VIP client\",  \u002F\u002F Internal - should not be exposed\n  \"password_hash\": \"$2b$12...\",    \u002F\u002F Critical - never expose\n  \"role\": \"admin\",                 \u002F\u002F May enable privilege discovery\n  \"created_by\": \"system_admin\",   \u002F\u002F Internal metadata\n  \"credit_card_last4\": \"4242\"     \u002F\u002F PCI compliance violation\n}\n```\n\n### Mass Assignment\n\nThe API binds client-supplied data to internal object properties without filtering:\n\n```http\n\u002F\u002F Normal user update request\nPUT \u002Fapi\u002Fv1\u002Fusers\u002F123\nContent-Type: application\u002Fjson\n\n{\n  \"name\": \"John Updated\",\n  \"email\": \"new@example.com\",\n  \"role\": \"admin\",           \u002F\u002F Attacker-injected: privilege escalation\n  \"is_verified\": true,       \u002F\u002F Attacker-injected: bypass verification\n  \"discount_rate\": 100,      \u002F\u002F Attacker-injected: business logic abuse\n  \"account_balance\": 999999  \u002F\u002F Attacker-injected: financial fraud\n}\n```\n\n## Testing Methodology\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"BOPLA Vulnerability Scanner\n\nTests APIs for Broken Object Property Level Authorization\nincluding Excessive Data Exposure and Mass Assignment.\n\"\"\"\n\nimport requests\nimport json\nimport sys\nfrom typing import Dict, List, Optional, Set\nfrom dataclasses import dataclass, field\nfrom copy import deepcopy\n\n@dataclass\nclass BOPLAFinding:\n    endpoint: str\n    method: str\n    vulnerability_type: str  # \"excessive_exposure\" or \"mass_assignment\"\n    severity: str\n    property_name: str\n    details: str\n\nclass BOPLAScanner:\n    SENSITIVE_PROPERTY_PATTERNS = {\n        \"critical\": [\n            \"password\", \"password_hash\", \"secret\", \"token\", \"api_key\",\n            \"private_key\", \"secret_key\", \"access_token\", \"refresh_token\",\n        ],\n        \"high\": [\n            \"ssn\", \"social_security\", \"tax_id\", \"credit_card\", \"card_number\",\n            \"cvv\", \"bank_account\", \"routing_number\",\n        ],\n        \"medium\": [\n            \"salary\", \"income\", \"internal_notes\", \"admin_notes\",\n            \"created_by\", \"modified_by\", \"ip_address\", \"session_id\",\n            \"role\", \"permissions\", \"is_admin\", \"is_superuser\", \"privilege\",\n        ],\n        \"low\": [\n            \"phone\", \"address\", \"date_of_birth\", \"dob\", \"age\",\n            \"gender\", \"ethnicity\", \"religion\",\n        ]\n    }\n\n    MASS_ASSIGNMENT_FIELDS = [\n        (\"role\", \"admin\"),\n        (\"is_admin\", True),\n        (\"is_verified\", True),\n        (\"is_active\", True),\n        (\"email_verified\", True),\n        (\"account_type\", \"premium\"),\n        (\"discount_rate\", 100),\n        (\"credit_limit\", 999999),\n        (\"permissions\", [\"admin\", \"write\", \"delete\"]),\n        (\"account_balance\", 999999),\n        (\"subscription_tier\", \"enterprise\"),\n        (\"rate_limit\", 999999),\n    ]\n\n    def __init__(self, base_url: str, auth_headers: Dict[str, str]):\n        self.base_url = base_url.rstrip('\u002F')\n        self.auth_headers = auth_headers\n        self.findings: List[BOPLAFinding] = []\n\n    def test_excessive_data_exposure(self, endpoint: str,\n                                      expected_fields: Set[str]) -> List[BOPLAFinding]:\n        \"\"\"Test if API response contains more fields than expected.\"\"\"\n        findings = []\n        url = f\"{self.base_url}{endpoint}\"\n\n        try:\n            response = requests.get(url, headers=self.auth_headers, timeout=10)\n            if response.status_code != 200:\n                return findings\n\n            data = response.json()\n\n            # Handle both single object and list responses\n            objects = data if isinstance(data, list) else [data]\n            if isinstance(data, dict) and \"data\" in data:\n                objects = data[\"data\"] if isinstance(data[\"data\"], list) else [data[\"data\"]]\n\n            for obj in objects[:5]:  # Check first 5 objects\n                if not isinstance(obj, dict):\n                    continue\n\n                response_fields = set(self._flatten_keys(obj))\n                unexpected_fields = response_fields - expected_fields\n\n                for field_name in unexpected_fields:\n                    severity = self._classify_sensitivity(field_name)\n                    if severity:\n                        finding = BOPLAFinding(\n                            endpoint=endpoint,\n                            method=\"GET\",\n                            vulnerability_type=\"excessive_exposure\",\n                            severity=severity,\n                            property_name=field_name,\n                            details=f\"Unexpected sensitive field '{field_name}' in response\"\n                        )\n                        findings.append(finding)\n                        self.findings.append(finding)\n\n        except (requests.exceptions.RequestException, json.JSONDecodeError):\n            pass\n\n        return findings\n\n    def test_mass_assignment(self, endpoint: str, method: str = \"PUT\",\n                              original_data: Optional[dict] = None) -> List[BOPLAFinding]:\n        \"\"\"Test if API accepts and processes additional injected properties.\"\"\"\n        findings = []\n        url = f\"{self.base_url}{endpoint}\"\n\n        # First, get the current object state\n        if original_data is None:\n            try:\n                response = requests.get(url, headers=self.auth_headers, timeout=10)\n                if response.status_code == 200:\n                    original_data = response.json()\n                else:\n                    original_data = {}\n            except (requests.exceptions.RequestException, json.JSONDecodeError):\n                original_data = {}\n\n        # Test each mass assignment field\n        for field_name, injected_value in self.MASS_ASSIGNMENT_FIELDS:\n            if field_name in original_data:\n                # Field exists - test if we can modify it\n                original_value = original_data[field_name]\n                if original_value == injected_value:\n                    continue  # Already has this value\n\n            test_data = deepcopy(original_data)\n            test_data[field_name] = injected_value\n\n            headers = {**self.auth_headers, \"Content-Type\": \"application\u002Fjson\"}\n\n            try:\n                if method == \"PUT\":\n                    response = requests.put(url, json=test_data,\n                                          headers=headers, timeout=10)\n                elif method == \"PATCH\":\n                    response = requests.patch(url, json={field_name: injected_value},\n                                            headers=headers, timeout=10)\n                elif method == \"POST\":\n                    response = requests.post(url, json=test_data,\n                                           headers=headers, timeout=10)\n\n                if response.status_code in (200, 201, 204):\n                    # Verify the field was actually modified\n                    verify_response = requests.get(url, headers=self.auth_headers, timeout=10)\n                    if verify_response.status_code == 200:\n                        updated_data = verify_response.json()\n                        if updated_data.get(field_name) == injected_value:\n                            finding = BOPLAFinding(\n                                endpoint=endpoint,\n                                method=method,\n                                vulnerability_type=\"mass_assignment\",\n                                severity=\"CRITICAL\" if field_name in [\"role\", \"is_admin\", \"permissions\"]\n                                         else \"HIGH\",\n                                property_name=field_name,\n                                details=f\"Successfully injected '{field_name}={injected_value}'\"\n                            )\n                            findings.append(finding)\n                            self.findings.append(finding)\n\n                            # Restore original value if possible\n                            if field_name in original_data:\n                                restore_data = {field_name: original_data[field_name]}\n                                requests.patch(url, json=restore_data,\n                                             headers=headers, timeout=10)\n\n            except requests.exceptions.RequestException:\n                continue\n\n        return findings\n\n    def test_graphql_property_exposure(self, graphql_endpoint: str,\n                                        query: str) -> List[BOPLAFinding]:\n        \"\"\"Test GraphQL APIs for property-level authorization issues.\"\"\"\n        findings = []\n        url = f\"{self.base_url}{graphql_endpoint}\"\n\n        # Introspection query to discover available fields\n        introspection = \"\"\"\n        {\n          __schema {\n            types {\n              name\n              fields {\n                name\n                type { name kind }\n              }\n            }\n          }\n        }\n        \"\"\"\n\n        try:\n            response = requests.post(\n                url,\n                json={\"query\": introspection},\n                headers=self.auth_headers,\n                timeout=10\n            )\n\n            if response.status_code == 200:\n                data = response.json()\n                if \"errors\" not in data:\n                    finding = BOPLAFinding(\n                        endpoint=graphql_endpoint,\n                        method=\"POST\",\n                        vulnerability_type=\"excessive_exposure\",\n                        severity=\"MEDIUM\",\n                        property_name=\"__schema\",\n                        details=\"GraphQL introspection enabled - full schema exposed\"\n                    )\n                    findings.append(finding)\n                    self.findings.append(finding)\n\n        except requests.exceptions.RequestException:\n            pass\n\n        return findings\n\n    def _flatten_keys(self, obj: dict, prefix: str = \"\") -> List[str]:\n        \"\"\"Recursively flatten nested dictionary keys.\"\"\"\n        keys = []\n        for key, value in obj.items():\n            full_key = f\"{prefix}.{key}\" if prefix else key\n            keys.append(full_key)\n            if isinstance(value, dict):\n                keys.extend(self._flatten_keys(value, full_key))\n        return keys\n\n    def _classify_sensitivity(self, field_name: str) -> Optional[str]:\n        \"\"\"Classify the sensitivity level of a field name.\"\"\"\n        lower_name = field_name.lower().split('.')[-1]\n        for severity, patterns in self.SENSITIVE_PROPERTY_PATTERNS.items():\n            for pattern in patterns:\n                if pattern in lower_name:\n                    return severity.upper()\n        return None\n\n    def generate_report(self) -> dict:\n        return {\n            \"total_findings\": len(self.findings),\n            \"by_type\": {\n                \"excessive_exposure\": len([f for f in self.findings\n                                          if f.vulnerability_type == \"excessive_exposure\"]),\n                \"mass_assignment\": len([f for f in self.findings\n                                       if f.vulnerability_type == \"mass_assignment\"]),\n            },\n            \"by_severity\": {\n                \"CRITICAL\": len([f for f in self.findings if f.severity == \"CRITICAL\"]),\n                \"HIGH\": len([f for f in self.findings if f.severity == \"HIGH\"]),\n                \"MEDIUM\": len([f for f in self.findings if f.severity == \"MEDIUM\"]),\n                \"LOW\": len([f for f in self.findings if f.severity == \"LOW\"]),\n            },\n            \"findings\": [\n                {\n                    \"endpoint\": f.endpoint,\n                    \"method\": f.method,\n                    \"type\": f.vulnerability_type,\n                    \"severity\": f.severity,\n                    \"property\": f.property_name,\n                    \"details\": f.details,\n                }\n                for f in self.findings\n            ]\n        }\n```\n\n## Mitigation\n\n```python\n# Server-side: Explicit property allowlists\nclass UserSerializer:\n    # Only expose these fields - never use to_json() or to_dict()\n    PUBLIC_FIELDS = ['id', 'username', 'name', 'avatar_url']\n    OWNER_FIELDS = PUBLIC_FIELDS + ['email', 'phone', 'preferences']\n    ADMIN_FIELDS = OWNER_FIELDS + ['role', 'created_at', 'last_login']\n\n    def serialize(self, user, requesting_user):\n        if requesting_user.is_admin:\n            fields = self.ADMIN_FIELDS\n        elif requesting_user.id == user.id:\n            fields = self.OWNER_FIELDS\n        else:\n            fields = self.PUBLIC_FIELDS\n\n        return {field: getattr(user, field) for field in fields}\n\n# Mass assignment protection - explicit allowlist for writable fields\nWRITABLE_FIELDS = {'name', 'email', 'phone', 'avatar_url', 'preferences'}\n\ndef update_user(user_id, request_data, requesting_user):\n    # Filter out any fields not in the allowlist\n    safe_data = {k: v for k, v in request_data.items() if k in WRITABLE_FIELDS}\n    # Apply updates only with safe data\n    User.objects.filter(id=user_id).update(**safe_data)\n```\n\n## References\n\n- OWASP API3:2023: https:\u002F\u002Fowasp.org\u002FAPI-Security\u002Feditions\u002F2023\u002Fen\u002F0xa3-broken-object-property-level-authorization\u002F\n- Salt Security BOPLA Analysis: https:\u002F\u002Fsalt.security\u002Fblog\u002Fapi3-2023-broken-object-property-level-authorization\n- Wallarm BOPLA Guide: https:\u002F\u002Flab.wallarm.com\u002Fapi32023-broken-object-property-level-authorization\u002F\n- API Security News BOPLA: https:\u002F\u002Fapisecurity.io\u002Fowasp-api-security-top-10\u002Fapi3-2023-broken-object-property-level-authorization\u002F\n- CloudDefense BOPLA: https:\u002F\u002Fwww.clouddefense.ai\u002Fowasp\u002F2023\u002F3\n",{"hide":54,"name":5,"source":55,"license":15,"description":7,"authorized_lab":50,"origin_frontmatter":56},true,"mukul975\u002FAnthropic-Cybersecurity-Skills","name: detecting-broken-object-property-level-authorization | description: Detect and test for OWASP API3:2023 Broken Object Property Level Authorization |   vulnerabilities including excessive data exposure and mass assignment attacks. | domain: cybersecurity | subdomain: api-security | tags: | - api-security | - bopla | - owasp-api3 | - mass-assignment | - excessive-data-exposure | - property-level-authorization | - api-testing | - penetration-testing | version: '1.0' | author: mahipal | licens","main","4c6d8d65f3d6096e2fc25b0845e481dda73c2794",".claude\u002Fskills\u002Fcyber-detecting-broken-object-property-level-authorization",0,"https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions","Building deterministic AI governance and continuity systems. Workflow architect + visual storyteller","2026-11-11 16:42:59",{"source":8,"skillName":5,"commands":66,"prompt":76,"zipAvailable":54},[67,70,73],{"tool":68,"command":69},"npx","npx skills add nexuslinkproductions\u002Fyuri-os --skill cyber-detecting-broken-object-property-level-authorization",{"tool":71,"command":72},"bunx","bunx skills add nexuslinkproductions\u002Fyuri-os --skill cyber-detecting-broken-object-property-level-authorization",{"tool":74,"command":75},"pnpm","pnpm dlx skills add nexuslinkproductions\u002Fyuri-os --skill cyber-detecting-broken-object-property-level-authorization","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcyber-detecting-broken-object-property-level-authorization\u002FSKILL.md",[],[79,102,125,153,180,199],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":49},"01M71CG1AME5WC0A79AE65WT0X","zoom-out","Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.","MIT","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002Fskills\u002Fzoom-out\u002FSKILL.md",[],[87,88,89,90,91,92,93,43,94,95,96,97,98,99,100,101],"zoom out","zoom","with","harness","how","section","re","understand","use","perspective","when","you","code","it","context",{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":49},"01M71CFY9ATD0BAXV6B14HFG7C","yuri-shura","6-perspective adversarial review for high-stakes turns (architecture decisions, refactor planning, deployment review) — fans out architect, adversary (7-vector attack), maintainer, ops, product, and security perspectives in parallel, then consolidates. Use when user says 'review this decision', '\u002Fshura', 'adversarial review', 'what could go wrong', 'architecture review', or 'deployment review'.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002Fskills\u002Fyuri-shura\u002FSKILL.md",[],[109,110,90,111,112,45,113,114,115,116,117,95,118,97,119,120,121,122,123,124],"yuri shura","parallel","architecture review","planning","deployment","vector","strategic review","decision","strategic","ops","workflow","decisions","architecture","review","perspectives","adversarial",{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":134,"publishedAt":49},"01M71CFTTYW1HA2MNX38EV1GJ5","yuri-sales-intelligence","Unified sales and outreach skill generating cold outreach openers, social selling sequences, objection rebuttals, and ad creative for any paid platform — multi-persona aware, adapting tone and offer frame to buyer type. Use when user says 'write a cold email', 'outreach sequence', 'objection handling', 'ad copy', or 'sales pitch'.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002Fskills\u002Fyuri-sales-intelligence\u002FSKILL.md",[131],{"categoryNo":132,"categoryName":133,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000005","邮件与沟通",[135,136,137,138,139,140,141,142,143,97,144,145,146,147,148,149,150,45,151,152],"intelligence","sales intelligence","yuri sales intelligence","sales","cold","paid","social","persona","pitch","cold email","ad creative","write","sequences","sequence","platform","email","cold outreach","frame",{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":165,"publishedAt":49},"01M71CFQMBFTFADJNGP0Z2WCYK","yuri-code-intelligence","Unified code quality intelligence layer that diagnoses code smells (Long Method, Feature Envy, design pattern issues), prescribes targeted Fowler refactoring techniques, and reviews code for security, performance, and clarity. Use when user says 'review this code', 'refactor this', 'what's wrong with this method', 'code smells', or 'clean this up'.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002Fskills\u002Fyuri-code-intelligence\u002FSKILL.md",[159,162],{"categoryNo":160,"categoryName":161,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000007","代码审查",{"categoryNo":163,"categoryName":164,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000030","开发工程师",[166,99,167,135,90,168,169,170,45,171,172,173,174,175,176,177,178,179,95,97],"yuri code intelligence","code intelligence","reviews","code quality","feature","performance","code review","long","up","issues","clean","techniques","improve","design",{"skillNo":181,"name":182,"nameZh":6,"description":183,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":6,"sourceHtmlUrl":184,"categories":185,"keywords":186,"publishedAt":49},"01M71CFP32RT6GD3GKNHCJP8VP","yuri-adw","Invoke when user asks to run the ADW loop \u002F agentic engineering loop \u002F software factory workflow.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002Fskills\u002Fyuri-adw\u002FSKILL.md",[],[187,188,189,190,191,192,193,194,195,97,196,119,197,198],"yuri adw","run","engineering loop","software factory","software","agentic engineering","factory","loop","invoke","engineering","agentic","user",{"skillNo":200,"name":201,"nameZh":6,"description":202,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":6,"sourceHtmlUrl":203,"categories":204,"keywords":215,"publishedAt":49},"01M71CFK4VPEKY6A73237P7RSN","writing-skills","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-skills\u002FSKILL.md",[205,206,209,212],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":207,"categoryName":208,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":210,"categoryName":211,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":213,"categoryName":214,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000036","内容创作者",[216,217,218,97,119,219,90,220,113,95,221],"writing","writing skills","new","work","editing","Existing"]